
<!DOCTYPE html>
<html class="ocks-org do-not-copy">

<head>
  <meta charset="utf-8">
  <title>Comprehensive Linux Cheatsheet</title>
  <link rel="icon" href="web/favicon.png">
  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:title" content="Comprehensive Linux Cheatsheet">
  <meta name="twitter:description" content="Exhaustive, beautiful and concise. Cheat sheet about Linux command line tools and configuration files.">
  <meta name="twitter:image" content="https://gto76.github.io/linux-cheatsheet/web/image_twitter_card.jpg">
</head>

<style>
@import url(web/style.css);

.join,
.link,
.node rect {
  fill: none;
  stroke: #636363;
  stroke-width: 1.5px;
}

.link {
  stroke: #969696;
}

.node rect {
  fill: white;
}

.link path,
.node rect,
.node text,
.join {
  -webkit-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
  -moz-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
  -ms-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
  -o-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
  transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;
}

.node .element rect {
  fill: #bdbdbd;
  stroke: none;
}

.node .null rect {
  fill: none;
  stroke: none;
}

.node .null text {
  fill: #636363;
}

.node .selection rect {
  stroke: #e6550d;
}

.node .data rect {
  stroke: #3182bd;
}

.node .datum rect {
  fill: #d9d9d9;
  stroke: none;
}

.node .code text {
  font-family: monospace;
}

.node .key rect {
  fill: #a1d99b;
  stroke: none;
}

.link .to-key,
.join {
  stroke: #a1d99b;
}

.join {
  stroke-dasharray: 2,2;
}

.link .to-null {
  stroke-dasharray: .5,3.5;
  stroke-linecap: round;
}

.link .from-data {
  stroke: #3182bd;
}

.play circle {
  fill: #fff;
  stroke: #000;
  stroke-width: 3px;
}

.play:hover path {
  fill: #f00;
}

.play.mousedown circle {
  fill: #f00;
}

.play.mousedown path {
  fill: #fff;
}

.play rect {
  fill: none;
  pointer-events: all;
  cursor: pointer;
}

code span {
  -webkit-transition: background 250ms linear;
  -moz-transition: background 250ms linear;
  -ms-transition: background 250ms linear;
  -o-transition: background 250ms linear;
  transition: background 250ms linear;
}

pre.prettyprint, code.prettyprint {
  background-color: #222;
  border-radius: 8px;
  font-size: 15px;
}

pre.prettyprint {
  width: 90%;
  margin: 0.5em;
  padding: 1em;
  white-space: pre-wrap;
}


</style>
<!-- td { 
    padding: 3px;
} -->
<body>
  <header>
    <aside>January 30, 2019</aside>
    <a href="../" rel="author">Jure Šorn</a>
  </header>

  <div>
    <h1>Comprehensive Linux Cheatsheet</h1>
    <p>
      <sup><a href="https://raw.githubusercontent.com/gto76/linux-cheatsheet/master/linux-cheatsheet.txt">Download text file</a>
or <a href="https://github.com/gto76/linux-cheatsheet">Fork me on GitHub</a>.
      </sup>
    </p>
    <p>
      <img src="web/penguins.jpg" alt="Penguin Colony">
    </p>

<h5>Gnome</h5>
<br>

<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Alt T</code></strong></td><td style="padding-top: 1px" valign="top">Terminal</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Alt F</code></strong></td><td style="padding-top: 1px" valign="top">Firefox</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Alt H</code></strong></td><td style="padding-top: 1px" valign="top">Home</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Alt G</code></strong></td><td style="padding-top: 1px" valign="top">Gedit</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Alt F12</code></strong></td><td style="padding-top: 1px" valign="top">Run command</td></tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Alt F1</code></strong></td><td style="padding-top: 1px" valign="top">Minimize window</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Alt F2</code></strong></td><td style="padding-top: 1px" valign="top">Toggle maximize window</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Alt F3</code></strong></td><td style="padding-top: 1px" valign="top">Toggle full screen</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Alt D</code></strong></td><td style="padding-top: 1px" valign="top">Minimize all windows</td></tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Alt F1-F6</code></strong></td><td style="padding-top: 1px" valign="top">Terminals (tty-s)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Alt F7-F12</code></strong></td><td style="padding-top: 1px" valign="top">Xwindows</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Alt Bksp</code></strong></td><td style="padding-top: 1px" valign="top">Restart X</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Alt Del</code></strong></td><td style="padding-top: 1px" valign="top">Log out</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Alt End</code></strong></td><td style="padding-top: 1px" valign="top">Shutdown</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Super PgUp/PgDn</code></strong></td><td style="padding-top: 1px" valign="top">Switch workspace</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Middle mouse button</code></strong></td><td style="padding-top: 1px" valign="top">Paste selected text</td></tr>

</tbody></table><br>
<h3>Nautilus/Nemo</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl L</code></strong></td><td style="padding-top: 1px" valign="top">Location, show path</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Shift N</code></strong></td><td style="padding-top: 1px" valign="top">New folder</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl H</code></strong></td><td style="padding-top: 1px" valign="top">Show hidden files</td></tr>

</tbody></table><br>
<h3>Gedit</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl G</code></strong></td><td style="padding-top: 1px" valign="top">Find next</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Shift G</code></strong></td><td style="padding-top: 1px" valign="top">Find previous</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Shift K</code></strong></td><td style="padding-top: 1px" valign="top">Clear highlights</td></tr>

</tbody></table><br>
<h3>Terminal</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Shift C</code></strong></td><td style="padding-top: 1px" valign="top">Copy</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Shift V</code></strong></td><td style="padding-top: 1px" valign="top">Paste</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Shift T</code></strong></td><td style="padding-top: 1px" valign="top">New tab <br></td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Shift W</code></strong></td><td style="padding-top: 1px" valign="top">Close tab   <br></td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl PgUp/PgDn</code></strong></td><td style="padding-top: 1px" valign="top">Switch tab</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl +/-</code></strong></td><td style="padding-top: 1px" valign="top">Zoom</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl D</code></strong></td><td style="padding-top: 1px" valign="top">Close terminal</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl S</code></strong></td><td style="padding-top: 1px" valign="top">Scroll lock</td></tr>

</tbody></table><br>
<h3>Bash</h3>
<p>Keys when in emacs mode. You can switch to '<code>vi</code>' mode with '<code>set -o vi</code>' command.</p>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl C</code></strong></td><td style="padding-top: 1px" valign="top">Interrupt, erase line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl A</code></strong></td><td style="padding-top: 1px" valign="top">Go to beginning of line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl E</code></strong></td><td style="padding-top: 1px" valign="top">End of line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl U</code></strong></td><td style="padding-top: 1px" valign="top">Copy line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl Y</code></strong></td><td style="padding-top: 1px" valign="top">Paste line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Alt .</code></strong></td><td style="padding-top: 1px" valign="top">Last argument</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl R</code></strong></td><td style="padding-top: 1px" valign="top">Search trough history</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Alt *</code></strong></td><td style="padding-top: 1px" valign="top">Show all matches for regular expression</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl+Alt E</code></strong></td><td style="padding-top: 1px" valign="top">Show current line passed through alias, history and shell expansion</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl X, Ctrl E</code></strong></td><td style="padding-top: 1px" valign="top">Edit command in editor</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl P</code></strong></td><td style="padding-top: 1px" valign="top">Show last command (same as up arrow)</td></tr>

</tbody></table><br>

<p><br><p>
<h5>Awesome Terminal Commands</h5>
<h2>Packages<a href="#packages" name="packages">#</a></h2>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>dpkg</code></strong></td><td style="padding-top: 7px" valign="top">Low level package manager for Debian.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-l</code></strong></td><td style="padding-top:0px" valign="top">Lists installed packages.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-i &lt;package&gt; (sudo)</code></strong></td><td style="padding-top:0px" valign="top">Installs package from a package file.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>apt-get</code></strong></td><td style="padding-top: 7px" valign="top">Advanced Package Tool built on top of '<code>dpkg</code>'. New command called simply '<code>apt</code>' is also available. It merges the functionalities of '<code>apt-get</code>' and '<code>apt-cache</code>'.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>update</code></strong></td><td style="padding-top:0px" valign="top">Updates local list of existing packages.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-u dist-upgrade</code></strong></td><td style="padding-top:0px" valign="top">Upgrades by intelligently handling changing dependencies with new versions of packages. To regularly update put this line in '<code>crontab</code>':<br> '<code>apt-get update && apt-get -u dist-upgrade</code>'.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>upgrade</code></strong></td><td style="padding-top:0px" valign="top">Same as dist-upgrade, but will not remove installed packages or install new ones.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>install &lt;package&gt;</code></strong></td><td style="padding-top:0px" valign="top">Also updates single package.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>remove &lt;package&gt;</code></strong></td><td style="padding-top:0px" valign="top">Removes package but leaves its configurations.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>remove apt-listchanges</code></strong></td><td style="padding-top:0px" valign="top">Useful when Debian can't find a package.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>purge &lt;package&gt;</code></strong></td><td style="padding-top:0px" valign="top">Removes package and its configurations. Run '<code>apt-get autoremove</code>' after to remove all dependencies that are not needed anymore.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>autoremove</code></strong></td><td style="padding-top:0px" valign="top">Removes unneeded packages.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>source &lt;package&gt;</code></strong></td><td style="padding-top:0px" valign="top">Downloads code.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>build-dep &lt;package&gt;</code></strong></td><td style="padding-top:0px" valign="top">Installs the build dependencies.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>--yes</code></strong></td><td style="padding-top:0px" valign="top">Answers with 'yes' to most questions (Except the ones that can have potentially harmful consequences).</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>--force-yes</code></strong></td><td style="padding-top:0px" valign="top">Answers 'yes' to all questions (Not recommended).</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>apt-cache</code></strong></td><td style="padding-top: 7px" valign="top">Queries the APT's internal database.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>search &lt;keyword&gt;</code></strong></td><td style="padding-top:0px" valign="top">Searches packages like '<code>apropos</code>', but globally.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>show &lt;package&gt;</code></strong></td><td style="padding-top:0px" valign="top">Shows package info like version, dependencies, etc.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>showpkg &lt;package&gt;</code></strong></td><td style="padding-top:0px" valign="top">Similar, but also shows the packages that depend on the searched package (reverse dependencies).</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>policy &lt;package&gt;</code></strong></td><td style="padding-top:0px" valign="top">Shows installed and remote version.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>apt-file</code></strong></td><td style="padding-top: 7px" valign="top">APT package searching utility.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>search &lt;file&gt;</code></strong></td><td style="padding-top:0px" valign="top">Search in which package a file is included.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>update</code></strong></td><td style="padding-top:0px" valign="top">Updates local list of package contents.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>aptitude</code></strong></td><td style="padding-top: 7px" valign="top">Enables package browsing (skin for apt-get).</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>search '~i!~M'</code></strong></td><td style="padding-top:0px" valign="top">Lists installed packages that were not installed as a dependency, with short description of each.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>search &lt;package&gt;</code></strong></td><td style="padding-top:0px" valign="top">Package search.</td></tr>

</table> </td> </tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>winetricks</code></strong></td><td style="padding-top: 1px" valign="top">Installs wine applications.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>update-alternatives</code></strong></td><td style="padding-top: 1px" valign="top">Maintains symbolic links determining default commands.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>unattended-upgrade</code></strong></td><td style="padding-top: 1px" valign="top">Automatic installation of security upgrades.</td></tr>

</tbody></table><br>
<h3>Commands</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>apropos &lt;cmd&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Searches the manual page names and descriptions (use quotes for phrases).</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-a</code></strong></td><td style="padding-top:0px" valign="top">Matches all keywords.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>whatis &lt;cmd&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Displays one-line manual page description.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>whereis &lt;cmd&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Locates the binary, source, and manual page files for a command.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>which &lt;cmd&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Locates only the binary of a command.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>wtf</code></strong></td><td style="padding-top: 1px" valign="top">Translates acronyms and filename suffixes.</td></tr>

</tbody></table><br>
<h3>Install Mantra</h3>
<pre><code>./configure --help
./configure
make
sudo make install</code></pre>
<h2>General<a href="#general" name="general">#</a></h2>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>su</code></strong></td><td style="padding-top: 7px" valign="top">Switches user.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>- &lt;user&gt;</code></strong></td><td style="padding-top:0px" valign="top">Switches to user.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-</code></strong></td><td style="padding-top:0px" valign="top">Switches to root.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>man</code></strong></td><td style="padding-top: 7px" valign="top">Help on commands.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>&lt;section&gt;</code></strong></td><td style="padding-top:0px" valign="top">Section numbers: 1. Programs, 2. System calls, 3. Library calls, 4. Special files, 5. File formats, 7. Miscellaneous, 8. System administration commands</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>echo</code></strong></td><td style="padding-top: 7px" valign="top">Prints passed text.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-n</code></strong></td><td style="padding-top:0px" valign="top">Does not add newline at the end.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-e</code></strong></td><td style="padding-top:0px" valign="top">Enables interpretation of backslashed letters.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>xargs &lt;cmd&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Passes output from one command to arguments of another:<br> '<code>echo -a | xargs ls</code>'</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-t</code></strong></td><td style="padding-top:0px" valign="top">Echoes the command before executing it.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-p</code></strong></td><td style="padding-top:0px" valign="top">Echoes command and asks for confirmation before execution.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-0</code></strong></td><td style="padding-top:0px" valign="top">Input items are separated by null character instead of space.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>tee &lt;file&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Sends output of a program to specified file and to standard output:<br> '<code>&lt;cmd_1&gt; | tee out_1.txt | &lt;cmd_2&gt;</code>'</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>/dev/tty</code></strong></td><td style="padding-top:0px" valign="top">Sends output to terminal and to standard output</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>expr</code></strong></td><td style="padding-top: 7px" valign="top">Evaluates passed expression.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>1 + 1</code></strong></td><td style="padding-top:0px" valign="top">Prints '<code>2</code>'.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>bc</code></strong></td><td style="padding-top: 7px" valign="top">Evaluates input. It's basically a calculator, but also provides some control commands.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>echo 1 + 1 | bc</code></strong></td><td style="padding-top:0px" valign="top">Prints '<code>2</code>'.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>echo "scale=5;3/4" | bc</code></strong></td><td style="padding-top:0px" valign="top">Prints '<code>.75000</code>'.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>sh</code></strong></td><td style="padding-top: 7px" valign="top">Runs command interpreter (shell). Can run a script even if not executable.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-c '&lt;commands&gt;'</code></strong></td><td style="padding-top:0px" valign="top">Starts new non-interactive shell and reads commands from arguments instead of '<code>stdin</code>'.<br> To append lines to system configuration file run:<br> '<code>sudo sh -c 'echo "&lt;text&gt;" &gt;&gt; &lt;file&gt;'</code>'</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>bash</code></strong></td><td style="padding-top: 7px" valign="top">Runs bash command interpreter (shell).</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-c</code></strong></td><td style="padding-top:0px" valign="top">Reads commands from arguments instead of '<code>stdin</code>'.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-n &lt;script&gt;</code></strong></td><td style="padding-top:0px" valign="top">Checks script for errors.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-x</code></strong></td><td style="padding-top:0px" valign="top">Prints commands before execution. Useful for debugging.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>gcc</code></strong></td><td style="padding-top: 7px" valign="top">Gnu C compiler. Run '<code>g++</code>' for C++ code.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-w</code></strong></td><td style="padding-top:0px" valign="top">Supresses warnings (Only prints errors).</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-Wall</code></strong></td><td style="padding-top:0px" valign="top">All warnings.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-g</code></strong></td><td style="padding-top:0px" valign="top">Compile for debugging.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-std=&lt;std&gt;</code></strong></td><td style="padding-top:0px" valign="top">Sets the standard. Suported standards for C are:<br> '<code>c90</code>', '<code>gnu90</code>', '<code>c99</code>', '<code>gnu99</code>', '<code>c11</code>' and '<code>gnu11</code>'.<br> Suported standarts for C++ are:<br> '<code>c++98</code>', '<code>gnu++98</code>', '<code>c++11</code>' and '<code>gnu++11</code>'.<br> '<code>gnu90</code>' and '<code>gnu++98</code>' are the default options.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-O&lt;level&gt;</code></strong></td><td style="padding-top:0px" valign="top">Optimization level. '<code>0</code>': Reduce compilation time (default), '<code>1-3</code>': - Level of optimization, '<code>s</code>' - Optimize for size, '<code>g</code>' - Optimize debugging experience.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>run-parts &lt;dir&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Runs all scripts or programs in a directory.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>date</code></strong></td><td style="padding-top: 7px" valign="top">Tells and sets date and time.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-s &lt;string&gt;</code></strong></td><td style="padding-top:0px" valign="top">Sets date.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>+%T -s "10:13:13"</code></strong></td><td style="padding-top:0px" valign="top">Sets time.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>timedatectl</code></strong></td><td style="padding-top: 7px" valign="top">Controls the system time and date.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>set-timezone CET</code></strong></td><td style="padding-top:0px" valign="top">Sets timezone.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>cal</code></strong></td><td style="padding-top: 1px" valign="top">Calendar</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>xclip</code></strong></td><td style="padding-top: 1px" valign="top">Copies to clipboard.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>mkfifo &lt;pipe&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Creates named pipe during that shell session.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>mkisofs</code></strong></td><td style="padding-top: 1px" valign="top">Creates a DVD/CD image.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>genisoimage</code></strong></td><td style="padding-top: 1px" valign="top">Creates a DVD/CD image (Debian).</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>cdrecord</code></strong></td><td style="padding-top: 1px" valign="top">Writes to a CD/DVD.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>acpi</code></strong></td><td style="padding-top: 1px" valign="top">Checks battery.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>fdisk -l (sudo)</code></strong></td><td style="padding-top: 1px" valign="top">Shows partitions.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>shutdown</code></strong></td><td style="padding-top: 7px" valign="top">Closes down the system at a given time.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>now</code></strong></td><td style="padding-top:0px" valign="top">Takes you to the single user mode.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-h now</code></strong></td><td style="padding-top:0px" valign="top">Begins the shutdown procedure, same as '<code>halt</code>' and '<code>poweroff</code>'.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-h 11:50</code></strong></td><td style="padding-top:0px" valign="top">At 11:50.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-r now</code></strong></td><td style="padding-top:0px" valign="top">Same as '<code>reboot</code>'.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>make</code></strong></td><td style="padding-top: 7px" valign="top">Utility that maintains groups of programs.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-q</code></strong></td><td style="padding-top:0px" valign="top">Doesn't run any commands, just returns '<code>0</code>' exit code if everything is up to date or non-zero otherwise.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-B</code></strong></td><td style="padding-top:0px" valign="top">Unconditionally makes all targets.</td></tr>

</table> </td> </tr>

</tbody></table><br>
<h3>Files</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>ls</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>-d</code></strong></td><td style="padding-top:7px" valign="top">List directory names instead of contents</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-S</code></strong></td><td style="padding-top:0px" valign="top">Sort by size</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-t</code></strong></td><td style="padding-top:0px" valign="top">Sort by time</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-1</code></strong></td><td style="padding-top:0px" valign="top">One file per line</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>./*</code></strong></td><td style="padding-top:0px" valign="top">Ls one level deep</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-i</code></strong></td><td style="padding-top:0px" valign="top">Get inode number of file (file id). Use '<code>sudo find / -inum &lt;number&gt;</code>' to find all links that point to same file.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>cp</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>-i</code></strong></td><td style="padding-top:7px" valign="top">Interactive (Prompts before overwrite)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-v</code></strong></td><td style="padding-top:0px" valign="top">Verbose (Explains what is being done)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-R</code></strong></td><td style="padding-top:0px" valign="top">Copy directories recursively</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-p</code></strong></td><td style="padding-top:0px" valign="top">Preserve mode, ownership and timestamps</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>--preserve=all</code></strong></td><td style="padding-top:0px" valign="top">Also preserves context, links and xattr</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>rm</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>-i</code></strong></td><td style="padding-top:7px" valign="top">Interactive (Prompts before every removal)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-v</code></strong></td><td style="padding-top:0px" valign="top">Verbose (Explains what is being done)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-f</code></strong></td><td style="padding-top:0px" valign="top">Force remove (Does not prompt, useful if '<code>rm</code>' is aliased with '<code>-i</code>')</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-R</code></strong></td><td style="padding-top:0px" valign="top">Removes directories and their content recursively</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>mkdir</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>-p</code></strong></td><td style="padding-top:1px" valign="top">Make parents if needed</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>ln</code></strong></td><td style="padding-top: 7px" valign="top">Makes links to the files</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-s &lt;file&gt; &lt;link&gt;</code></strong></td><td style="padding-top:0px" valign="top">Makes symbolic link. If you want to use relative paths you must be in links directory !!!!!!!!!!!!!!!!!!!!!!</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>df</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>-h</code></strong></td><td style="padding-top:1px" valign="top">Displays humanly readable free disk space</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>du</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>-s &lt;dir&gt;</code></strong></td><td style="padding-top:1px" valign="top">Directory size</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>mc</code></strong></td><td style="padding-top: 7px" valign="top">Midnight commander</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>Alt o</code></strong></td><td style="padding-top:0px" valign="top">Open parent dir in another panel</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>Ctrl o</code></strong></td><td style="padding-top:0px" valign="top">Switch to bash</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>find &lt;dir&gt;</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>-name &lt;file&gt;</code></strong></td><td style="padding-top:7px" valign="top">Search by name</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-regex &lt;regex&gt;</code></strong></td><td style="padding-top:0px" valign="top">Use regex for name search</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-not</code></strong></td><td style="padding-top:0px" valign="top">Insert before other options to negate</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-maxdepth &lt;levels&gt;</code></strong></td><td style="padding-top:0px" valign="top">Descend only to levels deep</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-samefile &lt;file&gt;</code></strong></td><td style="padding-top:0px" valign="top">Find all hard links of a file</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-xdev</code></strong></td><td style="padding-top:0px" valign="top">Don't descend directories on other filesystems</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-inum &lt;inum&gt;</code></strong></td><td style="padding-top:0px" valign="top">Find files with the inode number</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-type &lt;f|d|b|...&gt;</code></strong></td><td style="padding-top:0px" valign="top">Find files of type</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-delete</code></strong></td><td style="padding-top:0px" valign="top">Delete found files</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-exec &lt;cmd&gt; {} \;</code></strong></td><td style="padding-top:0px" valign="top">Find files and execute command for every found file. '<code>{}</code>' is replaced with filename</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-exec &lt;cmd&gt; {} +</code></strong></td><td style="padding-top:0px" valign="top">Find files and execute command with all filenames in place of '<code>{}</code>'</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-atime +/-n</code></strong></td><td style="padding-top:0px" valign="top">Find files that were last accessed less or more than n days.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-print0 | xargs -0 &lt;cmd&gt;</code></strong></td><td style="padding-top:0px" valign="top">Sends found files to a command as parameters. Uses '<code>NUL</code>' character as separator, necessary for filenames with spaces</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>locate &lt;regex&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Similar as '<code>find</code>' but using index</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-i</code></strong></td><td style="padding-top:0px" valign="top">Ignore case</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>--regex</code></strong></td><td style="padding-top:0px" valign="top">Interprets all patterns as extended regex</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-0 | xargs -0 &lt;cmd&gt;</code></strong></td><td style="padding-top:0px" valign="top">Sends found files to a command as parameters.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>updatedb (sudo)</code></strong></td><td style="padding-top: 1px" valign="top">Update locate index</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>md5sum</code></strong></td><td style="padding-top: 1px" valign="top">Prints md5 sum hash of a file</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>read</code></strong></td><td style="padding-top: 7px" valign="top">Read single line from standard input</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-n 1</code></strong></td><td style="padding-top:0px" valign="top">Print after reading one character</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-s</code></strong></td><td style="padding-top:0px" valign="top">Do not echo input coming from terminal</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>shred</code></strong></td><td style="padding-top: 1px" valign="top">Securely remove files</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>file</code></strong></td><td style="padding-top: 1px" valign="top">Determine file's type</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>tree</code></strong></td><td style="padding-top: 1px" valign="top">Ls in a tree-like (hierarchical) format</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>install</code></strong></td><td style="padding-top: 1px" valign="top">Copy files and set attributes</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>gpg</code></strong></td><td style="padding-top: 7px" valign="top">Decrypt file with password</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-c</code></strong></td><td style="padding-top:0px" valign="top">Encrypt</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>mktemp</code></strong></td><td style="padding-top: 1px" valign="top">Create a temporary file or directory in '<code>/tmp</code>' and returns it's name.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>rename</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>s/&lt;from&gt;/&lt;to&gt; &lt;files&gt;</code></strong></td><td style="padding-top:1px" valign="top">Renames multiple files using '<code>sed</code>' syntax</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>rsync</code></strong></td><td style="padding-top: 7px" valign="top">A fast, versatile, remote (and local) file-copying tool</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-Hbaz -e ssh</code></strong></td><td style="padding-top:0px" valign="top">'<code>&lt;src_dir&gt; &lt;user&gt;@&lt;host&gt;:&lt;dest_dir&gt;</code>' - Backs up the 'src-dir': '<code>-H</code>' preserves hard links, '<code>-b</code>' renames preexisting destination files (back up), '<code>-a</code>' preserve everything except hard links and '<code>-z</code>' compresses.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>cmp</code></strong></td><td style="padding-top:0px" valign="top">Compares two files, similar to diff but also for binaries</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>stat</code></strong></td><td style="padding-top: 7px" valign="top">Displays files status</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-c%X</code></strong></td><td style="padding-top:0px" valign="top">Time of last modification of the file</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>readlink</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>-f</code></strong></td><td style="padding-top:1px" valign="top">Follow link recursively and print files path</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>xdg-open</code></strong></td><td style="padding-top: 1px" valign="top">Open file with default application for the file type</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>dialog</code></strong></td><td style="padding-top: 1px" valign="top">Display dialog box from shell script</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>watch</code></strong></td><td style="padding-top: 1px" valign="top">Execute command periodically</td></tr>

</tbody></table><br>
<h3>Archives</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>dtrx</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>&lt;archive&gt;</code></strong></td><td style="padding-top:1px" valign="top">Universal archive extractor</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>tar</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>xvzf &lt;file&gt;.tar.gz (.tgz)</code></strong></td><td style="padding-top:7px" valign="top">Decompress and detar</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>xvjf &lt;file&gt;.tar.bz2</code></strong></td><td style="padding-top:0px" valign="top">Decompress and detar</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-cf &lt;archive&gt;.tar &lt;files&gt;</code></strong></td><td style="padding-top:0px" valign="top">Compress</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>unzip</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>\*.zip</code></strong></td><td style="padding-top:7px" valign="top">Backslash is necessary so that bash doesn't expand the '<code>*</code>'</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-d &lt;dir&gt;</code></strong></td><td style="padding-top:0px" valign="top">Extract into directory (create if doesn't exist)</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>zip</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>-r &lt;archive&gt; &lt;dir&gt;</code></strong></td><td style="padding-top:7px" valign="top">Compress whole directory recursively.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-g &lt;archive&gt; &lt;files&gt;</code></strong></td><td style="padding-top:0px" valign="top">Add files to existing archive (grow).</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>unrar</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>e</code></strong></td><td style="padding-top:1px" valign="top">Extract files from rar archive</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>zcat</code></strong></td><td style="padding-top: 1px" valign="top">Cats gziped file</td></tr>

</tbody></table><br>
<h3>Terminal Multiplexers</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>screen</code></strong></td><td style="padding-top: 7px" valign="top">Switch between multiple virtual terminals (useful in ssh). Prefix for a command is '<code>Ctrl a</code>'.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>c</code></strong></td><td style="padding-top:0px" valign="top">New terminal,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>n</code></strong></td><td style="padding-top:0px" valign="top">Next,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>p</code></strong></td><td style="padding-top:0px" valign="top">Previous,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>a</code></strong></td><td style="padding-top:0px" valign="top">Go to beginning of line,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>|</code></strong></td><td style="padding-top:0px" valign="top">New region vertically,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>S</code></strong></td><td style="padding-top:0px" valign="top">New region horizontally,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>tab</code></strong></td><td style="padding-top:0px" valign="top">Move to next region,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>Q</code></strong></td><td style="padding-top:0px" valign="top">Close all but selected region,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>X</code></strong></td><td style="padding-top:0px" valign="top">Kill the current region,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>esc</code></strong></td><td style="padding-top:0px" valign="top">Enter copy/scrollback mode -&gt; space: start/stop marking,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>]</code></strong></td><td style="padding-top:0px" valign="top">Paste,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>k</code></strong></td><td style="padding-top:0px" valign="top">Kill window,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>t</code></strong></td><td style="padding-top:0px" valign="top">Show time and avg CPU load</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>tmux</code></strong></td><td style="padding-top: 7px" valign="top">Terminal multiplexer, better screen. Prefix for a command is '<code>Ctrl b</code>'. Most commands are the same as in '<code>screen</code>'.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>ls</code></strong></td><td style="padding-top:0px" valign="top">Shows running sessions</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>attach [-t &lt;no&gt;]</code></strong></td><td style="padding-top:0px" valign="top">Attach to running session</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>d</code></strong></td><td style="padding-top:0px" valign="top">Detach from currently attached session<br></td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>pgup</code></strong></td><td style="padding-top:0px" valign="top">Enter in copy mode and pageup,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>[</code></strong></td><td style="padding-top:0px" valign="top">Copy mode,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>]</code></strong></td><td style="padding-top:0px" valign="top">Paste,<br></td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>"</code></strong></td><td style="padding-top:0px" valign="top">Split horizontally,</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>%</code></strong></td><td style="padding-top:0px" valign="top">Split vertically</td></tr>

</table> </td> </tr>

</tbody></table><br>
<h2>Bash<a href="#bash" name="bash">#</a></h2>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>"$x"</code></strong></td><td style="padding-top: 1px" valign="top">ALWAYS PUT DOUBLE QUOTES AROUND VARIABLE!!!!!!!!!!!!!!! All variables in bash are global!!!!!!!</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>"$*"</code></strong></td><td style="padding-top: 1px" valign="top">Combines all the arguments into single word, separating them with first character of IFS variable. If IFS is not set, space is used. If IFS is null, no separator is used!!!!!!!!! No args provided will result in one empty string being passed on!!!</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>"$@"</code></strong></td><td style="padding-top: 1px" valign="top">Use this instead!!!!! Will retain arguments as-is, so no args provided will result in no args being passed on. This is in most cases what you want to use for passing on arguments. Google: "$@" is right almost everytime, and $* is wrong almost everytime.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>"$#"</code></strong></td><td style="padding-top: 1px" valign="top">Number of arguments</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>"$1"</code></strong></td><td style="padding-top: 1px" valign="top">First argument</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>"$0"</code></strong></td><td style="padding-top: 1px" valign="top">Name of the script</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>$'\n'</code></strong></td><td style="padding-top: 1px" valign="top">String literal with escape sequences (there is a backslash before n) If you want IFS to be a new line (useful with for loop) you need to: '<code>IFS=$'\n'</code>' - The dollar forces substitution!!!!! Also if you want 'while read line; do...' to preserve leading spaces and tabs, you need to set IFS=""</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>$?</code></strong></td><td style="padding-top: 1px" valign="top">Exit code of last command (0 - Success)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl-Z, kill %%</code></strong></td><td style="padding-top: 1px" valign="top">Kill looping bash script</td></tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>test &lt;expr&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Same as '<code>[ &lt;expr&gt; ]</code>'. Returns zero exit status if true.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-n</code></strong></td><td style="padding-top:0px" valign="top">Is string non empty</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-z</code></strong></td><td style="padding-top:0px" valign="top">Is string empty</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-a</code></strong></td><td style="padding-top:0px" valign="top">And</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-o</code></strong></td><td style="padding-top:0px" valign="top">Or</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>=</code></strong></td><td style="padding-top:0px" valign="top">Strings are equal</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-nt</code></strong></td><td style="padding-top:0px" valign="top">File newer than</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-ot</code></strong></td><td style="padding-top:0px" valign="top">Older then</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-d</code></strong></td><td style="padding-top:0px" valign="top">Directory exists</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-e</code></strong></td><td style="padding-top:0px" valign="top">File exists</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-f</code></strong></td><td style="padding-top:0px" valign="top">Is a regular file</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-h</code></strong></td><td style="padding-top:0px" valign="top">Its a symbolic link</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-r</code></strong></td><td style="padding-top:0px" valign="top">Has read permission</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-w</code></strong></td><td style="padding-top:0px" valign="top">Has write permission</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-x</code></strong></td><td style="padding-top:0px" valign="top">Has execute permission</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>[[ &lt;expr&gt; ]]</code></strong></td><td style="padding-top: 1px" valign="top">Same as '<code>[</code>', but without word splitting and filename expansion. And with additional operators: '<code>&&</code>', '<code>||</code>', '<code>&lt;</code>', '<code>&gt;</code>' (lexicographic less, more), and also regular expression matching.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>=~</code></strong></td><td style="padding-top: 1px" valign="top">Regex comparison operator: '<code>[[ "$HOST" =~ ^user.* ]]</code>'</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>let &lt;expr&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Executes expression: let a="$b"+2</td></tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>$(command)</code></strong></td><td style="padding-top: 1px" valign="top">Same as '<code>command</code>'</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>eval &lt;variable&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Execute string as command</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>$RANDOM</code></strong></td><td style="padding-top: 1px" valign="top">0 - 32767</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>input='<code>cat</code>'</code></strong></td><td style="padding-top: 1px" valign="top">Getting standard input</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>-</code></strong></td><td style="padding-top: 1px" valign="top">In place of a file name means standard in or out</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>set -o vi</code></strong></td><td style="padding-top: 1px" valign="top">Set line editing to vi mode</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>pushd .</code></strong></td><td style="padding-top: 1px" valign="top">Put current dir on stack</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>popd</code></strong></td><td style="padding-top: 1px" valign="top">Pop dir from stack</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>cd -</code></strong></td><td style="padding-top: 1px" valign="top">go to last dir</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>source &lt;script&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Run script: for example source /etc/profile (same as . &lt;cmd&gt;)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>#!/bin/bash</code></strong></td><td style="padding-top: 1px" valign="top">Good practice to insert at beginning of a bash script</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>export</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>PATH="$PATH:&lt;dir&gt;"</code></strong></td><td style="padding-top:1px" valign="top">Adds new directory to path environment variable.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>read</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>-p &lt;message&gt;</code></strong></td><td style="padding-top:1px" valign="top">Prompt for user input</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>var=${1:-"&lt;default&gt;"}</code></strong></td><td style="padding-top: 1px" valign="top">Setting variable with default value if $1 is empty</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>getopts</code></strong></td><td style="padding-top: 1px" valign="top">Parse parameters/arguments, builtin</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>getopt</code></strong></td><td style="padding-top: 1px" valign="top">GNU version is even better then getopts, not a builtin</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>while read line; do &lt;commands&gt;; done &lt; &lt;file&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Read from file line by line</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-r</code></strong></td><td style="padding-top:0px" valign="top">Do not treat backslashes as escape characters</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>complete -F &lt;completion_function&gt; &lt;cmd&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Set completion function for command</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>complete -p &lt;cmd&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Print the completion function for command</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>compgen -c &lt;pattern&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Print all completions for pattern</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>help &lt;builtin&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Display information about builtin command</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>wait</code></strong></td><td style="padding-top: 1px" valign="top">Wait for all background processes to end</td></tr>

</tbody></table><br>
<h3>Safety</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>set</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>-e</code></strong></td><td style="padding-top:7px" valign="top">Exit if any command fails</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-u</code></strong></td><td style="padding-top:0px" valign="top">Exit if referencing undefined variable</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-o pipefail</code></strong></td><td style="padding-top:0px" valign="top">If any command in a pipeline fails, its return code is used as the return code of the whole pipeline</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>IFS=$'\n\t'</code></strong></td><td style="padding-top: 1px" valign="top">Remove space from the default Internal Field Separator</td></tr>

</tbody></table><br>
<h3>History</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>sudo !!</code></strong></td><td style="padding-top: 1px" valign="top">Run the last command as root</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>␣&lt;cmd&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Execute a command without saving it in the history</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>!&lt;cmd&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Run last command that starts with cmd</td></tr>

</tbody></table><br>
<h3>Redirections</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>&lt;cmd&gt; 2&gt; /dev/null</code></strong></td><td style="padding-top: 1px" valign="top">Redirect error output to '<code>null</code>'</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>&lt;cmd&gt; &&gt; /dev/null</code></strong></td><td style="padding-top: 1px" valign="top">Redirect both standard and error output to '<code>null</code>'</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>&lt;cmd&gt; &gt;&2</code></strong></td><td style="padding-top: 1px" valign="top">Write to stderr</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>&lt;cmd&gt; 2&gt;&1 | less</code></strong></td><td style="padding-top: 1px" valign="top">Add stderr to stdout and print it with less (useful for gcc)</td></tr>

</tbody></table><br>
<h3>Arrays And Lines</h3>
<p>Reads line by line from variable. To preserve spaces use '<code>IFS=</code>'.</p>
<pre><code>while IFS= read -r line; do
    echo "... $line ..."
done &lt;&lt;&lt; "$list" — </code></pre>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>${a[1]}</code></strong></td><td style="padding-top: 1px" valign="top">Value of the second element of the array</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>for c in ${a[@]}</code></strong></td><td style="padding-top: 1px" valign="top">Iterate over array</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>${varname:offset:length}</code></strong></td><td style="padding-top: 1px" valign="top">Get substring: '<code>s="aeiou"; ${s:3:1} -&gt; o</code>'</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>${#var}</code></strong></td><td style="padding-top: 1px" valign="top">Length of a var</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>${#name[subscript]}</code></strong></td><td style="padding-top: 1px" valign="top">Length  of the element</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>${#name[@]}</code></strong></td><td style="padding-top: 1px" valign="top">Length  of the array</td></tr>

</tbody></table><br>
<h3>Aliases And Functions</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>alias</code></strong></td><td style="padding-top: 7px" valign="top">Print all aliases</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>&lt;name&gt;</code></strong></td><td style="padding-top:0px" valign="top">Print alias</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>&lt;name&gt;='cmd'</code></strong></td><td style="padding-top:0px" valign="top">Set alias</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>command &lt;cmd&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Executes original command, bypassing any aliases or shell functions that may be defined for command</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>\&lt;cmd&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Temporarily disable alias (call original)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>type &lt;cmd&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Will tell you what is command aliased to or if it is a builtin, function or a command -P just check commands</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>declare -F</code></strong></td><td style="padding-top: 1px" valign="top">Print function names</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>declare -f</code></strong></td><td style="padding-top: 1px" valign="top">Print functions</td></tr>

</tbody></table><br>
<h2>Text<a href="#text" name="text">#</a></h2>
<h3>Print</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>head</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>-n-&lt;num_of_lines&gt;</code></strong></td><td style="padding-top:7px" valign="top">Print all lines but the last n</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-c &lt;num_of_chars&gt;</code></strong></td><td style="padding-top:0px" valign="top">Print first c characters</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>tail</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>-n+&lt;line_num&gt;</code></strong></td><td style="padding-top:7px" valign="top">Start at line number</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-f</code></strong></td><td style="padding-top:0px" valign="top">Do not stop printing (follow)</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>cat</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>-n</code></strong></td><td style="padding-top:7px" valign="top">Number all lines</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>&gt;&gt; file</code></strong></td><td style="padding-top:0px" valign="top">Simplest text editor (great for pasting)</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>less</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>&&lt;patt&gt;</code></strong></td><td style="padding-top:7px" valign="top">Display only lines with pattern</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-N</code></strong></td><td style="padding-top:0px" valign="top">Show line numbers</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-~</code></strong></td><td style="padding-top:0px" valign="top">Do not show '<code>~</code>' after '<code>EOF</code>'</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>+G</code></strong></td><td style="padding-top:0px" valign="top">Tells less to start at the end of the file</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>+F</code></strong></td><td style="padding-top:0px" valign="top">Follow the input (to scroll up first press ctrl+c)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-F</code></strong></td><td style="padding-top:0px" valign="top">Or --quit-if-one-screen</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>v</code></strong></td><td style="padding-top:0px" valign="top">Opens editor defined in '<code>$VISUAL</code>' or '<code>$EDITOR</code>'</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>:n</code></strong></td><td style="padding-top:0px" valign="top">Examine the next file</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>&lt;, &gt;</code></strong></td><td style="padding-top:0px" valign="top">Go to home, end</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>wc</code></strong></td><td style="padding-top: 1px" valign="top">Count lines, words and characters</td></tr>

</tbody></table><br>
<h3>Edit</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>sudo -e &lt;file&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Edit file as sudo</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>tr &lt;from&gt; &lt;to&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Translate characters</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-d</code></strong></td><td style="padding-top:0px" valign="top">Delete characters</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>cut &lt;file&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Removes columns from each line of files</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-d ':' -f 1,7 /etc/passwd</code></strong></td><td style="padding-top:0px" valign="top">Only show the username and the shell</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>sort</code></strong></td><td style="padding-top: 7px" valign="top">Sorts lines</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-u</code></strong></td><td style="padding-top:0px" valign="top">Uniq, removes duplicates</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-t</code></strong></td><td style="padding-top:0px" valign="top">Set delimiter for fields (default is space)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-k</code></strong></td><td style="padding-top:0px" valign="top">Select by which field to sort</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>uniq</code></strong></td><td style="padding-top: 7px" valign="top">Removes adjacent duplicates</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-d</code></strong></td><td style="padding-top:0px" valign="top">Intersection</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-u</code></strong></td><td style="padding-top:0px" valign="top">Difference</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>column</code></strong></td><td style="padding-top: 7px" valign="top">Columnate text</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-t</code></strong></td><td style="padding-top:0px" valign="top">Create a table</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>shuf</code></strong></td><td style="padding-top: 1px" valign="top">Shuffle input lines</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>tac</code></strong></td><td style="padding-top: 1px" valign="top">Concatenate and print files in reverse (reverse '<code>cat</code>')</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>join</code></strong></td><td style="padding-top: 1px" valign="top">Join lines of two files on a common field</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>colrm</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>[from [to]]</code></strong></td><td style="padding-top:1px" valign="top">Removes columns</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>seq &lt;number&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Output numbers from 1 to number</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ispell, aspell</code></strong></td><td style="padding-top: 1px" valign="top">Interactive spell checker</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>basename &lt;path&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Strips directory from path</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-s .&lt;suffix&gt;</code></strong></td><td style="padding-top:0px" valign="top">Also strip suffix</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-a</code></strong></td><td style="padding-top:0px" valign="top">Process multiple filenames</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>dirname &lt;path&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Strip last component from path</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>fmt</code></strong></td><td style="padding-top: 1px" valign="top">Produce roughly uniform line lengths</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>fold</code></strong></td><td style="padding-top: 1px" valign="top">Wrap each input line to fit in specified width</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>paste</code></strong></td><td style="padding-top: 1px" valign="top">Glue two documents side by side</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>sed</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>'s///g'</code></strong></td><td style="padding-top:7px" valign="top">Substitute every occurrence in line, not just the first one</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>'s///I'</code></strong></td><td style="padding-top:0px" valign="top">Ignore case</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-r</code></strong></td><td style="padding-top:0px" valign="top">Extended syntax, for '<code>+</code>', '<code>?</code>', ... Also you shouldn't escape the parenthesis</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-r 's###e'</code></strong></td><td style="padding-top:0px" valign="top">Execute match as a command</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-i &lt;file&gt;</code></strong></td><td style="padding-top:0px" valign="top">Will make changes directly to the file (in place)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-u</code></strong></td><td style="padding-top:0px" valign="top">Unbuffered mode (processes input immediately)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-n l</code></strong></td><td style="padding-top:0px" valign="top">Print escape sequence (keycode) of a pressed key</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>expand</code></strong></td><td style="padding-top: 7px" valign="top">Convert tabs to spaces</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-t &lt;number&gt;</code></strong></td><td style="padding-top:0px" valign="top">Set number of spaces (default is 8)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-i</code></strong></td><td style="padding-top:0px" valign="top">Do not convert tabs after non blanks</td></tr>

</table> </td> </tr>

</tbody></table><br>
<h3>Diff</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>diff</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>-u &lt;files&gt;</code></strong></td><td style="padding-top:7px" valign="top">Unified format</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>--brief -r</code></strong></td><td style="padding-top:0px" valign="top">Compare two directory trees</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>colordiff</code></strong></td><td style="padding-top: 1px" valign="top">Version of diff with colors</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>sdiff</code></strong></td><td style="padding-top: 1px" valign="top">Two files side by side</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>comm</code></strong></td><td style="padding-top: 1px" valign="top">Compare two sorted files line by line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>patch</code></strong></td><td style="padding-top: 7px" valign="top">Apply a diff file to original</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>patch &lt; patch.diff</code></strong></td><td style="padding-top:0px" valign="top">Apply patch</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>diff -u &lt;old_file&gt; &lt;new_file&gt; &gt; patch.diff</code></strong></td><td style="padding-top:0px" valign="top">Create patch</td></tr>

</table> </td> </tr>

</tbody></table><br>
<h3>Search</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>grep &lt;patt&gt; &lt;file&gt;</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>-v</code></strong></td><td style="padding-top:7px" valign="top">Inverse</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-n</code></strong></td><td style="padding-top:0px" valign="top">Line numbers</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-w</code></strong></td><td style="padding-top:0px" valign="top">Whole word</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-A&lt;num&gt;</code></strong></td><td style="padding-top:0px" valign="top">Print also num lines after</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-B&lt;num&gt;</code></strong></td><td style="padding-top:0px" valign="top">Print also num lines before</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-r</code></strong></td><td style="padding-top:0px" valign="top">Recursive</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-o</code></strong></td><td style="padding-top:0px" valign="top">Print only matching part</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-P</code></strong></td><td style="padding-top:0px" valign="top">Perl notation with additional operators such as: '<code>\\t</code>', '<code>+</code>' and '<code>?</code>' (non-greedy!!!!).</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-i</code></strong></td><td style="padding-top:0px" valign="top">Ignore case</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-I</code></strong></td><td style="padding-top:0px" valign="top">Do not process binary files</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-l</code></strong></td><td style="padding-top:0px" valign="top">Just print files with matches</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-L</code></strong></td><td style="padding-top:0px" valign="top">Just print files without matches</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-e &lt;patt&gt;</code></strong></td><td style="padding-top:0px" valign="top">Necessary to put before pattern if it starts with '<code>-</code>'!!!!!!! or if you want multiple patterns.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>| wc -l</code></strong></td><td style="padding-top:0px" valign="top">Count occurrences</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>--line-buffered</code></strong></td><td style="padding-top:0px" valign="top">Processes input line by line instead of in bigger chunks</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>look</code></strong></td><td style="padding-top: 1px" valign="top">Display lines beginning with a given string</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>strings</code></strong></td><td style="padding-top: 1px" valign="top">Print all text parts of binary file</td></tr>

</tbody></table><br>
<h3>Convert</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>todos, fromdos</code></strong></td><td style="padding-top: 1px" valign="top">Convert line endings form/to windows format (package tofrodos)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>enscript</code></strong></td><td style="padding-top: 1px" valign="top">Converts text files to postscript, rtf, HTML</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gs</code></strong></td><td style="padding-top: 1px" valign="top">Ghostscript: postscript and PDF language interpreter and previewer</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>pdftohtml</code></strong></td><td style="padding-top: 1px" valign="top">Pdf to html</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>pdftotext</code></strong></td><td style="padding-top: 1px" valign="top">Pdf to text</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>libreoffice</code></strong></td><td style="padding-top: 1px" valign="top">New Openoffice</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>figlet</code></strong></td><td style="padding-top: 1px" valign="top">Display large characters made up of ordinary screen characters (Ascii art)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>toilet</code></strong></td><td style="padding-top: 1px" valign="top">Similar (Ascii art)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>cproto</code></strong></td><td style="padding-top: 1px" valign="top">Generates C function prototypes (declarations)</td></tr>

</tbody></table><br>
<h3>Editors</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>nano</code></strong></td><td style="padding-top: 7px" valign="top">Simple text editor.</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>/etc/nanorc</code></strong></td><td style="padding-top:0px" valign="top">Config file.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>/usr/share/nano/&lt;lang&gt;.nanorc</code></strong></td><td style="padding-top:0px" valign="top">Syntax highlight files.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>Alt + / or ?</code></strong></td><td style="padding-top:0px" valign="top">Go to last line.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>fte</code></strong></td><td style="padding-top: 1px" valign="top">Cool text editor with CUA (IBM)-shortcuts</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>diakonos</code></strong></td><td style="padding-top: 1px" valign="top">Simple terminal text editor with ctrl-c for copy</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>pyroom</code></strong></td><td style="padding-top: 1px" valign="top">Distraction free writing (gui)</td></tr>

</tbody></table><br>
<h2>Network<a href="#network" name="network">#</a></h2>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>whois</code></strong></td><td style="padding-top: 1px" valign="top">Info about domain</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>host &lt;ip/hostname&gt;</code></strong></td><td style="padding-top: 1px" valign="top">DNS lookup utility</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>nslookup</code></strong></td><td style="padding-top: 1px" valign="top">Same interactively</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>dig</code></strong></td><td style="padding-top: 1px" valign="top">Same, lot of options</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>hostname</code></strong></td><td style="padding-top: 1px" valign="top">Prints/sets computer name, to set it permanently edit '<code>/etc/hostname</code>' and '<code>/etc/hosts</code>'</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>netstat</code></strong></td><td style="padding-top: 7px" valign="top">Displays contents of /proc/net files,  status of ports...</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-r</code></strong></td><td style="padding-top:0px" valign="top">Show routing table</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-i</code></strong></td><td style="padding-top:0px" valign="top">Show interfaces</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>arp</code></strong></td><td style="padding-top: 1px" valign="top">Manipulate the system ARP cache (IP -&gt; mac)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>route</code></strong></td><td style="padding-top: 7px" valign="top">Tool used to display or modify the routing table</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>add default gw &lt;ip&gt;</code></strong></td><td style="padding-top:0px" valign="top">Change the default gateway should DNS not be configured correctly on your machine, you need to edit '<code>/etc/resolv.conf</code>' to make things work</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>ifconfig eth0</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>down/up (sudo)</code></strong></td><td style="padding-top:7px" valign="top">Turn network interface on/off</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>&lt;ip&gt; netmask &lt;mask&gt; up</code></strong></td><td style="padding-top:0px" valign="top">Set ip and mask</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ifup eth0</code></strong></td><td style="padding-top: 1px" valign="top">Will bring eth0 up if it is currently down.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>ip</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>link show</code></strong></td><td style="padding-top:7px" valign="top">List network interfaces</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>link set dev eth0 up</code></strong></td><td style="padding-top:0px" valign="top">Bring interface eth0 up or down</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>addr show</code></strong></td><td style="padding-top:0px" valign="top">List addresses of interfaces</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>route add default via &lt;ip&gt;</code></strong></td><td style="padding-top:0px" valign="top">Set default gateway</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>traceroute, traceroute6, traceroute6.iputils</code></strong></td><td style="padding-top: 1px" valign="top">Traces route</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>tracepath, tracepath6</code></strong></td><td style="padding-top: 1px" valign="top">Similar (iputils package)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>mtr</code></strong></td><td style="padding-top: 1px" valign="top">Combines the functionality of the traceroute and ping</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>findsmb</code></strong></td><td style="padding-top: 1px" valign="top">List info about machines that respond to SMB name queries - Windows based machines sharing their hard disks</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/services</code></strong></td><td style="padding-top: 1px" valign="top">List of internet services with their port numbers</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>NetworkManager</code></strong></td><td style="padding-top: 1px" valign="top">Network management daemon, configuration file is in /etc/NetworkManager/NetworkManager.conf</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>nm-tool</code></strong></td><td style="padding-top: 1px" valign="top">Prints info</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>nm-online</code></strong></td><td style="padding-top: 1px" valign="top">Is network connected</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>nmcli</code></strong></td><td style="padding-top: 1px" valign="top">Command-line tool for controlling NetworkManager</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>nc</code></strong></td><td style="padding-top: 1px" valign="top">(netcat) It can open TCP connections, send UDP packets, listen on arbitrary TCP and UDP ports, do port scanning...</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ncat</code></strong></td><td style="padding-top: 1px" valign="top">Concatenate and redirect sockets</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>ethtool eth0</code></strong></td><td style="padding-top: 7px" valign="top">Show status of eth0</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-S</code></strong></td><td style="padding-top:0px" valign="top">Statistics</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-s</code></strong></td><td style="padding-top:0px" valign="top">Change settings (speed, duplex,...)</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>ss -tupl</code></strong></td><td style="padding-top: 7px" valign="top">List internet services on a system</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-tuo</code></strong></td><td style="padding-top:0px" valign="top">List active connections to/from system</td></tr>

</table> </td> </tr>

</tbody></table><br>
<h3>Wireless</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>iwconfig</code></strong></td><td style="padding-top: 1px" valign="top">Sets the wireless configuration options basic to most wireless devices</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>iwlist wlan0</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>&lt;option&gt;</code></strong></td><td style="padding-top:7px" valign="top">Displays current status information of a device, more detailed then iwconfig</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>scan (sudo)</code></strong></td><td style="padding-top:0px" valign="top">List wireless networks in range</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>iwspy</code></strong></td><td style="padding-top: 1px" valign="top">Sets the list of IP addresses in a wireless network and checks the quality of their connections</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>iwpriv</code></strong></td><td style="padding-top: 1px" valign="top">Accesses configuration options specific to a particular device</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>rfkill</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>list</code></strong></td><td style="padding-top:7px" valign="top">Show wireless adapters (wifi and bluetooth)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>block/unblock &lt;dev_num&gt;</code></strong></td><td style="padding-top:0px" valign="top">Block/unblock wireless device</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>iw dev wlan0</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>link</code></strong></td><td style="padding-top:7px" valign="top">Show link status of wlan0</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>set biterates &lt;standard&gt;</code></strong></td><td style="padding-top:0px" valign="top">Manually set interface speed</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>scan (sudo)</code></strong></td><td style="padding-top:0px" valign="top">List wireless networks in range</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>wavemon</code></strong></td><td style="padding-top: 1px" valign="top">Monitor wireless connection link quality</td></tr>

</tbody></table><br>
<h2>Internet<a href="#internet" name="internet">#</a></h2>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>mutt</code></strong></td><td style="padding-top: 1px" valign="top">Mail client</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>sftp</code></strong></td><td style="padding-top: 1px" valign="top">Secure ftp</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>sshd</code></strong></td><td style="padding-top: 1px" valign="top">(openssh-server) ssh server deamon, on Windows service is named 'CYGWIN sshd'</td></tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/init.d/ssh restart (sudo)</code></strong></td><td style="padding-top: 1px" valign="top">Restart sshd (ssh deamon)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/usr/local/etc/init.d/openssh start (sudo)</code></strong></td><td style="padding-top: 1px" valign="top">Start openssh deamon</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ssh-keygen -t rsa -C &lt;email&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Generate rsa key pair, keys are stored in ~/.ssh</td></tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>ssh</code></strong></td><td style="padding-top: 7px" valign="top">SSH client</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>&lt;user&gt;@&lt;address&gt; "mpg321 -" &lt; &lt;file&gt;.mp3</code></strong></td><td style="padding-top:0px" valign="top">Stream audio over ssh</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>enter ~.</code></strong></td><td style="padding-top:0px" valign="top">Kill unresponsive session</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>scp</code></strong></td><td style="padding-top: 1px" valign="top">Securely copy files over network. Example: '<code>scp &lt;local_file&gt; &lt;user&gt;@&lt;host&gt;:~&lt;remote_file&gt;</code>'</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>wget</code></strong></td><td style="padding-top: 7px" valign="top">Download files from WWW</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-O</code></strong></td><td style="padding-top:0px" valign="top">Specify output file</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-c</code></strong></td><td style="padding-top:0px" valign="top">Continue downloading unfinished file. Can also use wildcards, but use single quotes around url.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-r -l1 --no-parent -A.gif</code></strong></td><td style="padding-top:0px" valign="top">Recursively to the depth of one ignoring references to the parent directory and all gifs.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>curl</code></strong></td><td style="padding-top: 7px" valign="top">Similar</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-qO -</code></strong></td><td style="padding-top:0px" valign="top">Writes to standard output + quiet</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-i</code></strong></td><td style="padding-top:0px" valign="top">Urls specified by standard input</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>transmissioncli</code></strong></td><td style="padding-top: 7px" valign="top">Torrent terminal client</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-d</code></strong></td><td style="padding-top:0px" valign="top">Download limit (kB/s)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-u</code></strong></td><td style="padding-top:0px" valign="top">Upload limit</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>youtube-dl</code></strong></td><td style="padding-top: 1px" valign="top">Download from YouTube</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>noip2</code></strong></td><td style="padding-top: 1px" valign="top">Dynamic dns update client</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>rdesktop</code></strong></td><td style="padding-top: 1px" valign="top">Remote Desktop Protocol client</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>tin, nn</code></strong></td><td style="padding-top: 1px" valign="top">Usenet client</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>nrss</code></strong></td><td style="padding-top: 1px" valign="top">Rss feed reader</td></tr>

</tbody></table><br>
<h3>Browsers</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>lynx</code></strong></td><td style="padding-top: 7px" valign="top">Terminal web browser</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-cmd_log=&lt;file&gt;</code></strong></td><td style="padding-top:0px" valign="top">Write keystrokes to script</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-cmd_script=&lt;file&gt;</code></strong></td><td style="padding-top:0px" valign="top">Read keystrokes from script</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-syslog-urls</code></strong></td><td style="padding-top:0px" valign="top">Log requested URLs with syslog.</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-dumb</code></strong></td><td style="padding-top:0px" valign="top">Prints txt to stdout</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-crawl</code></strong></td><td style="padding-top:0px" valign="top">Same, turns numbers off</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-source</code></strong></td><td style="padding-top:0px" valign="top">Prints html to stdout</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-l</code></strong></td><td style="padding-top:0px" valign="top">Add the current link to your bookmark file</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>a</code></strong></td><td style="padding-top:0px" valign="top">Save the address of a document or link to a bookmark file, by default ~/lynx_bookmarks.html</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>o</code></strong></td><td style="padding-top:0px" valign="top">Options (you can select vim mode)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>ctrl+n</code></strong></td><td style="padding-top:0px" valign="top">Scroll down two lines</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>ctrl+p</code></strong></td><td style="padding-top:0px" valign="top">Scroll up two lines</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>ctrl+p</code></strong></td><td style="padding-top:0px" valign="top">Previous line</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>crrl+n</code></strong></td><td style="padding-top:0px" valign="top">Next line</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>elinks</code></strong></td><td style="padding-top: 1px" valign="top">Another web browser (has menus)</td></tr>

</tbody></table><br>
<h3>Hacking</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>nmap</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>-sP 192.168.1.1-3</code></strong></td><td style="padding-top:7px" valign="top">Network scanning</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>192.168.1.3 -p100-139</code></strong></td><td style="padding-top:0px" valign="top">Port scanning</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-O 192.168.1.3 (sudo)</code></strong></td><td style="padding-top:0px" valign="top">Scanning os</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>tcpdump (sudo)</code></strong></td><td style="padding-top: 7px" valign="top">Sniffer (show network traffic)</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-l</code></strong></td><td style="padding-top:0px" valign="top">Buffered output (for piping to less, etc.)</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ettercap</code></strong></td><td style="padding-top: 1px" valign="top">Multipurpose sniffer/interceptor/logger for switched LAN (can detect man in the middle, denial of service, DNS spoofing)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>driftnet</code></strong></td><td style="padding-top: 1px" valign="top">Picks out and displays images from network traffic</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>kismet</code></strong></td><td style="padding-top: 1px" valign="top">Wireless 802.11b monitoring tool</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>aircrack-ng</code></strong></td><td style="padding-top: 1px" valign="top">Wireless WEP/WPA cracking utilities</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Cain & Abel</code></strong></td><td style="padding-top: 1px" valign="top">Password recovery tool for Microsoft Operating Systems</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>dnsniff</code></strong></td><td style="padding-top: 7px" valign="top">Warious hacking tools:</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>arpspoof</code></strong></td><td style="padding-top:0px" valign="top">For man in the middle attack</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>dsniff</code></strong></td><td style="padding-top:0px" valign="top">Password sniffer for several protocols, ...</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>ip link set eth0</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>promisc on</code></strong></td><td style="padding-top:7px" valign="top">Set network interface to promiscuous mode</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>multicast off</code></strong></td><td style="padding-top:0px" valign="top">Set multicast off</td></tr>

</table> </td> </tr>

</tbody></table><br>
<h2>System<a href="#system" name="system">#</a></h2>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>meta, system info</code></strong></td><td style="padding-top: 1px" valign="top">In cinnamon</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>uname -a</code></strong></td><td style="padding-top: 1px" valign="top">Print system info, kernel version</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>cat /etc/issue</code></strong></td><td style="padding-top: 1px" valign="top">Show name and version of distribution</td></tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>init</code></strong></td><td style="padding-top: 1px" valign="top">Upstart init daemon job configuration</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>telinit</code></strong></td><td style="padding-top: 1px" valign="top">Change system runlevel</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>dmesg</code></strong></td><td style="padding-top: 1px" valign="top">Print the contents of your bootup (startup) messages displayed by the kernel. This is often useful when debugging problems</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>getconf -a</code></strong></td><td style="padding-top: 1px" valign="top">Print all system configuration variables</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>nohup &lt;cmd&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Run a command immune to hangups, runs even after the shell is closed (writes output to nohup.out)</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>&&gt;/dev/null &</code></strong></td><td style="padding-top:0px" valign="top">Run a command immune to hangups in background, do not save output</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>wmctrl</code></strong></td><td style="padding-top: 1px" valign="top">X Window Manager</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>awesome</code></strong></td><td style="padding-top: 7px" valign="top">Tiled window manager</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-k</code></strong></td><td style="padding-top:0px" valign="top">Check configuration script for errors</td></tr>

</table> </td> </tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>busybox &lt;cmd&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Combines tiny versions of many common UNIX utilities into a single small executable. (1.5 Mb)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>mono</code></strong></td><td style="padding-top: 1px" valign="top">.NET support</td></tr>

</tbody></table><br>
<h3>Users</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>users</code></strong></td><td style="padding-top: 1px" valign="top">Prints logged in users</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>who</code></strong></td><td style="padding-top: 1px" valign="top">Logged in users, more data</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>w</code></strong></td><td style="padding-top: 1px" valign="top">Logged in users, also what are they running</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>vipw</code></strong></td><td style="padding-top: 1px" valign="top">Edit password file</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>vigr</code></strong></td><td style="padding-top: 1px" valign="top">Edit groups file</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>umask</code></strong></td><td style="padding-top: 1px" valign="top">the umask is a value set by the shell. It controls the default permissions of any file created</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>usermod &lt;user&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Modify user account information</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-l &lt;new_name&gt; &lt;old_name&gt;</code></strong></td><td style="padding-top:0px" valign="top"></td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-c "&lt;new_real_name&gt;" &lt;user&gt;</code></strong></td><td style="padding-top:0px" valign="top"></td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-d /my/new/home &lt;user&gt;</code></strong></td><td style="padding-top:0px" valign="top">Change location of the users home</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-m -d /my/new/home</code></strong></td><td style="padding-top:0px" valign="top">Also move the files</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>useradd &lt;user&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Add user</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>adduser &lt;user&gt;</code></strong></td><td style="padding-top: 7px" valign="top">More high level (use '<code>adduser &lt;user&gt; sudo</code>'  after to add user to sudo group)</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>--system</code></strong></td><td style="padding-top:0px" valign="top">Create system user (can not log in)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>&lt;group&gt;</code></strong></td><td style="padding-top:0px" valign="top">Add user to group (only takes effect after login!!!)</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>groups &lt;user&gt;</code></strong></td><td style="padding-top: 1px" valign="top">What groups user belongs to</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>userdel -r &lt;user&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Remove user and his home dir</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>deluser</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>-remove-all-files &lt;user&gt;</code></strong></td><td style="padding-top:1px" valign="top">More high level, removes also files outside home, cron jobs, itd</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>passwd &lt;user&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Change password</td></tr>

</tbody></table><br>
<h3>File Systems</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>mkfs</code></strong></td><td style="padding-top: 1px" valign="top">Build a Linux filesystem</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>mke2fs</code></strong></td><td style="padding-top: 1px" valign="top">Create a ext filesystem</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>mkswap</code></strong></td><td style="padding-top: 1px" valign="top">Set up a swap area</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>parted</code></strong></td><td style="padding-top: 7px" valign="top">Partition manipulation program</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-l (sudo)</code></strong></td><td style="padding-top:0px" valign="top">List partitions</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>fdisk</code></strong></td><td style="padding-top: 7px" valign="top">Manipulate disk partition table</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-l (sudo)</code></strong></td><td style="padding-top:0px" valign="top">List partitions</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>disks</code></strong></td><td style="padding-top: 1px" valign="top">Nice GUI partition tool</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>mount</code></strong></td><td style="padding-top: 7px" valign="top">List all mounted devices (to get list of devices use '<code>fdisk -l</code>')</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>&lt;device&gt; &lt;path&gt;</code></strong></td><td style="padding-top:0px" valign="top">For example mount /dev/hdc2 to /mymedia</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>lsattr</code></strong></td><td style="padding-top: 1px" valign="top">List file attributes</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>chattr</code></strong></td><td style="padding-top: 1px" valign="top">Change file attributes</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>rkhunter -c</code></strong></td><td style="padding-top: 1px" valign="top">Checks if it can find any rootkits under the system</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ntfsundelete</code></strong></td><td style="padding-top: 1px" valign="top">Undelete files on NTFS partition</td></tr>

</tbody></table><br>
<h3>Logging</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>last</code></strong></td><td style="padding-top: 1px" valign="top">When various users have logged in or out. This includes information on when the computer was rebooted.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>lastlog</code></strong></td><td style="padding-top: 1px" valign="top">Displays a list of users and what day/time they logged into the system.<br> To get all failed logins run:<br> '<code>cat /var/log/auth.log | grep "failed password" -i</code>'.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>rsyslogd</code></strong></td><td style="padding-top: 1px" valign="top">manages all the logs on your system closelog, openlog, syslog, vsyslog -&gt; library calls that send messages to the system logger</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>logger</code></strong></td><td style="padding-top: 1px" valign="top">Makes entries in the system log</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>zeitgeist</code></strong></td><td style="padding-top: 1px" valign="top">Activity logger</td></tr>

</tbody></table><br>
<h3>Load</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>tload</code></strong></td><td style="padding-top: 1px" valign="top">'graphic' representation of system load</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>top</code></strong></td><td style="padding-top: 7px" valign="top">Show processes by resource consumption</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>&lt;, &gt;</code></strong></td><td style="padding-top:0px" valign="top">Change resource</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>htop</code></strong></td><td style="padding-top: 1px" valign="top">Better top</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>free -tm</code></strong></td><td style="padding-top: 7px" valign="top">Displays memory statistics</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-s &lt;seconds&gt;</code></strong></td><td style="padding-top:0px" valign="top">Continuously display</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>vmstat</code></strong></td><td style="padding-top: 1px" valign="top">Performance of system components / virtual memory statistics</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>sar</code></strong></td><td style="padding-top: 1px" valign="top">System activity information</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>iostat</code></strong></td><td style="padding-top: 1px" valign="top">Disk usage</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>time &lt;cmd&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Time a execution of a command</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>perf</code></strong></td><td style="padding-top: 1px" valign="top">Profiler</td></tr>

</tbody></table><br>
<h3>Tracing</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>auditd</code></strong></td><td style="padding-top: 1px" valign="top">System call auditing (package)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ausearch</code></strong></td><td style="padding-top: 1px" valign="top">Querys the audit logs</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>autrace</code></strong></td><td style="padding-top: 1px" valign="top">Traces a specific process</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>auditctl</code></strong></td><td style="padding-top: 1px" valign="top">Controls the behavior of the auditd server</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>strace &lt;cmd&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Trace system calls and signals. All printed system calls can be looked up by '<code>man</code>'!</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-s</code></strong></td><td style="padding-top:0px" valign="top">Maximum string size we want printed (default is too short, 2000 is OK)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-f</code></strong></td><td style="padding-top:0px" valign="top">Also follow children</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-p &lt;pid&gt;</code></strong></td><td style="padding-top:0px" valign="top">Attach to process</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-o &lt;file&gt;</code></strong></td><td style="padding-top:0px" valign="top">Write output to file</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-c</code></strong></td><td style="padding-top:0px" valign="top">Count/aggregate</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-T</code></strong></td><td style="padding-top:0px" valign="top">Time the execution of each call</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ltrace</code></strong></td><td style="padding-top: 1px" valign="top">List library calls made by command</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>lsof</code></strong></td><td style="padding-top: 7px" valign="top">List open files with file descriptors</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-p &lt;pid&gt;</code></strong></td><td style="padding-top:0px" valign="top">Open files by process</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>&lt;path&gt;</code></strong></td><td style="padding-top:0px" valign="top">Open files in path</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>lsmod</code></strong></td><td style="padding-top: 1px" valign="top">Show which kernel modules (drivers) are loaded</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>modinfo &lt;module&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Get more information about kernel module</td></tr>

</tbody></table><br>
<h3>Hardware</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>lshw (sudo)</code></strong></td><td style="padding-top: 1px" valign="top">List all hardware</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>lspci [-tv]</code></strong></td><td style="padding-top: 1px" valign="top">Show pci info</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>lsusb [-tv]</code></strong></td><td style="padding-top: 1px" valign="top">Show usb info</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>lscpu</code></strong></td><td style="padding-top: 1px" valign="top">Print CPU information</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>dmidecode -q</code></strong></td><td style="padding-top: 1px" valign="top">Display bios/dmi information like ram size/type, max ram, computer model name, cpu information.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>smartctl</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>-A /dev/sda</code></strong></td><td style="padding-top:1px" valign="top">Show disk usage info</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>hdparm</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>-tT /dev/sda</code></strong></td><td style="padding-top:1px" valign="top">Do a read speed test</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>badblocks</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>-s /dev/sda</code></strong></td><td style="padding-top:1px" valign="top">Check for bad blocks</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>fstrim -v /</code></strong></td><td style="padding-top: 1px" valign="top">Discard unused blocks, useful for ssd-s</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>sensors</code></strong></td><td style="padding-top: 1px" valign="top">(lm-sensors) hardware monitoring tool, temperature, fan speed</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>pwmconfig</code></strong></td><td style="padding-top: 1px" valign="top">(fancontrol) set fan speed</td></tr>

</tbody></table><br>
<h3>Terminal</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>tty</code></strong></td><td style="padding-top: 1px" valign="top">Print the file name of the terminal connected to standard input</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>stty</code></strong></td><td style="padding-top: 1px" valign="top">Change and print terminal line settings</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>openvt</code></strong></td><td style="padding-top: 1px" valign="top">run a program on a next available tty</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>script</code></strong></td><td style="padding-top: 1px" valign="top">Makes a typescript of everything printed on your terminal. Ctrl-d to stop recording.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>setterm</code></strong></td><td style="padding-top: 7px" valign="top">Set terminal attributes</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-cursor off/on</code></strong></td><td style="padding-top:0px" valign="top">Set cursor on/off</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gpm</code></strong></td><td style="padding-top: 1px" valign="top">Enable mouse for tty</td></tr>

</tbody></table><br>
<h3>Keys/Characters/Fonts</h3>
<h3>In X</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>xmodmap</code></strong></td><td style="padding-top: 1px" valign="top">Remap keys</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>setxkbmap -layout us</code></strong></td><td style="padding-top: 1px" valign="top">Set us keyboard layout</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>xev</code></strong></td><td style="padding-top: 1px" valign="top">Get keycodes of pressed keys</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>xset</code></strong></td><td style="padding-top: 7px" valign="top">User preference utility for X</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-r</code></strong></td><td style="padding-top:0px" valign="top">Turn key autorepeat off</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>r</code></strong></td><td style="padding-top:0px" valign="top">Turn key autorepeat on</td></tr>

</table> </td> </tr>

</tbody></table><br>
<h3>X Not Necessary</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>loadkeys &lt;country_code&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Load key mapping</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>showkey</code></strong></td><td style="padding-top: 1px" valign="top">Get keycodes of pressed keys</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>setfont &lt;font&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Set console font</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>/usr/share/consolefonts/Uni2-VGA16.psf.gz</code></strong></td><td style="padding-top:0px" valign="top">For example</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>/etc/default/console-setup</code></strong></td><td style="padding-top:0px" valign="top">contains the default settings</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>jfbterm</code></strong></td><td style="padding-top: 1px" valign="top">Enable unicode characters in terminal</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>echo -en "\e]PC7373C9"</code></strong></td><td style="padding-top: 1px" valign="top">Change blue color in tty (first numeral after P means slot, and others shade)</td></tr>

</tbody></table><br>
<h2>Processes<a href="#processes" name="processes">#</a></h2>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>ps --forest</code></strong></td><td style="padding-top: 7px" valign="top">View hierarchical view of processes</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>v</code></strong></td><td style="padding-top:0px" valign="top">Virtual memory</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>--sort &lt;field&gt;</code></strong></td><td style="padding-top:0px" valign="top">Sort by field</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>pstree</code></strong></td><td style="padding-top: 1px" valign="top">Similar</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>pgrep &lt;pattern&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Prints PIDs of processes containing pattern</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-l</code></strong></td><td style="padding-top:0px" valign="top">Also print process name</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>pkill &lt;pattern&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Kills every process that contains pattern in name</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>kill</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>&lt;pid&gt;</code></strong></td><td style="padding-top:7px" valign="top">Sends TERM signal to process</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-kill &lt;pid&gt;</code></strong></td><td style="padding-top:0px" valign="top">Sends KILL signal meaning force quit, data will be lost</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>killall</code></strong></td><td style="padding-top: 1px" valign="top">Uses name instead of pid</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>skill</code></strong></td><td style="padding-top: 7px" valign="top">Sends signals to command/user/tty or report process status</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-stop &lt;user&gt;</code></strong></td><td style="padding-top:0px" valign="top">Stop all of the users processes</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-cont &lt;user&gt;</code></strong></td><td style="padding-top:0px" valign="top">Continue all users processes</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>nice</code></strong></td><td style="padding-top: 7px" valign="top">Sets the priority for a process (from max of -20 to min of 20)</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-20 &lt;cmd&gt;</code></strong></td><td style="padding-top:0px" valign="top">Execute command with maximum priority</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>renice</code></strong></td><td style="padding-top: 7px" valign="top">Changes the priority of an existing process</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>+20 &lt;pid&gt;</code></strong></td><td style="padding-top:0px" valign="top">Change processes priority to lowest level</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>snice</code></strong></td><td style="padding-top: 7px" valign="top">Works very similarly to skill</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-10 -u root</code></strong></td><td style="padding-top:0px" valign="top">Increase the priority of all root's processes</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>pmap</code></strong></td><td style="padding-top: 1px" valign="top">Report memory map of a process (mapped file)</td></tr>

</tbody></table><br>
<h3>Jobs</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Ctrl z</code></strong></td><td style="padding-top: 1px" valign="top">Put job into background</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>jobs</code></strong></td><td style="padding-top: 1px" valign="top">Prints currently running job</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>bg &lt;job_id&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Put job in background</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>fg &lt;job_id&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Bring job to the foreground</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>%n</code></strong></td><td style="padding-top: 1px" valign="top">Job number n</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>%s</code></strong></td><td style="padding-top: 1px" valign="top">Job whose command line starts with s</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>%%</code></strong></td><td style="padding-top: 1px" valign="top">Current job</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>%-</code></strong></td><td style="padding-top: 1px" valign="top">Previous job</td></tr>

</tbody></table><br>
<h3>Scheduled Commands</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>at</code></strong></td><td style="padding-top: 1px" valign="top">Executes command at a particular time at 21:30 / at now + time / at -f shell_script now + 1 hour echo "ls -l" | at midnight</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>atq</code></strong></td><td style="padding-top: 1px" valign="top">List jobs currently in 'at' queue</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>atrm</code></strong></td><td style="padding-top: 1px" valign="top">Remove a job from the 'at' queue</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>crontab -e</code></strong></td><td style="padding-top: 1px" valign="top">Schedule commands for repeating execution</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>cron</code></strong></td><td style="padding-top: 7px" valign="top">Daemon that executes scheduled commands</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>sudo service cron status</code></strong></td><td style="padding-top:0px" valign="top">Print status of cron</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>sudo service cron [stop|start|restart]</code></strong></td><td style="padding-top:0px" valign="top">Stop, start, or restart cron deamon</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>sudo vim /etc/default/cron</code></strong></td><td style="padding-top:0px" valign="top">Set logging lever</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>cat /var/log/cron</code></strong></td><td style="padding-top:0px" valign="top">Print log</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>anacron</code></strong></td><td style="padding-top: 1px" valign="top">Like cron but it catches up with tasks next time the computer gets turned on</td></tr>

</tbody></table><br>
<h3>Services</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>service</code></strong></td><td style="padding-top: 7px" valign="top">Allows you to start, stop or restart a service (it runs a script in /etc/init.d folder)</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-f sshd</code></strong></td><td style="padding-top:0px" valign="top">Restart the ssh server</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>httpd status</code></strong></td><td style="padding-top:0px" valign="top">Get status of apache</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>--status-all</code></strong></td><td style="padding-top:0px" valign="top">Print status of all services You can also execute the shell script directly from /etc/init.d folder like: /etc/init.d/httpd stop.</td></tr>

</table> </td> </tr>

</tbody></table><br>
<h3>System Runlevels</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>runlevel</code></strong></td><td style="padding-top: 7px" valign="top">Output previous and current runlevel</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>0</code></strong></td><td style="padding-top:0px" valign="top">Shuts down the system</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>1</code></strong></td><td style="padding-top:0px" valign="top">Administrative single-user mode</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>2</code></strong></td><td style="padding-top:0px" valign="top">Same as 3 but without networking / multiuser with X server</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>3</code></strong></td><td style="padding-top:0px" valign="top">Text mode state (ctrl+alt+F1) / User defined</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>4</code></strong></td><td style="padding-top:0px" valign="top">User defined</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>5</code></strong></td><td style="padding-top:0px" valign="top">X-window mode (ctrl+alt+F7) / User defined</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>6</code></strong></td><td style="padding-top:0px" valign="top">Reboots</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>S</code></strong></td><td style="padding-top:0px" valign="top">Single user mode</td></tr>

</table> </td> </tr>

</tbody></table><br>
<h2>Multimedia<a href="#multimedia" name="multimedia">#</a></h2>
<h3>Audio</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>alsamixer</code></strong></td><td style="padding-top: 1px" valign="top">Set audio level (curses)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>amixer</code></strong></td><td style="padding-top: 1px" valign="top">Set audio levels (command line)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>rmmod pcspkr (sudo)</code></strong></td><td style="padding-top: 1px" valign="top">Disable pc-speaker, beep</td></tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>cmus</code></strong></td><td style="padding-top: 1px" valign="top">Music player (can be controlled from outside)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>mplayer</code></strong></td><td style="padding-top: 1px" valign="top">Movie/music player</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>mpg321</code></strong></td><td style="padding-top: 1px" valign="top">Plays mp3</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ogg123</code></strong></td><td style="padding-top: 1px" valign="top">Plays ogg</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>aplay</code></strong></td><td style="padding-top: 1px" valign="top">Plays audio</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>play</code></strong></td><td style="padding-top: 1px" valign="top">Plays audio</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>arecord &lt;file&gt;</code></strong></td><td style="padding-top: 7px" valign="top">Command line audio recorder and player</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-f &lt;format&gt;</code></strong></td><td style="padding-top:0px" valign="top">Set file format (cd)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-d &lt;seconds&gt;</code></strong></td><td style="padding-top:0px" valign="top">Set duration</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-f cd -d &lt;seconds&gt; -t raw | lame -x -r</code></strong></td><td style="padding-top:0px" valign="top">Out.mp3 — Capture audio that is playing and convert it to mp3</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>id3v2 -l</code></strong></td><td style="padding-top: 1px" valign="top">Lists all files tags</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>sound-juicer</code></strong></td><td style="padding-top: 1px" valign="top">Cd ripper</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>xfburn</code></strong></td><td style="padding-top: 1px" valign="top">Cd burner</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>traverso</code></strong></td><td style="padding-top: 1px" valign="top">Simple daw</td></tr>

</tbody></table><br>
<h3>Bitmap</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>display</code></strong></td><td style="padding-top: 1px" valign="top">Displays an image</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>montage</code></strong></td><td style="padding-top: 7px" valign="top">Creates a montage from images</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>&lt;input_file/s&gt; -set label '%t' &lt;output_file/s&gt;</code></strong></td><td style="padding-top:0px" valign="top">Labels images</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>convert &lt;old&gt; &lt;new&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Converts file format (imagemagick)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>import</code></strong></td><td style="padding-top: 1px" valign="top">Captures screen-shots from the X server</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>mogrify</code></strong></td><td style="padding-top: 1px" valign="top">Edit image</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gocr</code></strong></td><td style="padding-top: 1px" valign="top">Command line text recognition tool</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ocrad</code></strong></td><td style="padding-top: 1px" valign="top">Command line text recognition tool</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ppmforge</code></strong></td><td style="padding-top: 1px" valign="top">Creates picture of random planet or clouds</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>gnuplot</code></strong></td><td style="padding-top: 7px" valign="top">Interactive plotter: plot [-10:10] sin(x)</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-p</code></strong></td><td style="padding-top:0px" valign="top">Leave plots open after exit</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>plot &lt;file&gt;.dat</code></strong></td><td style="padding-top:0px" valign="top">Plot data from dat file</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>fbi</code></strong></td><td style="padding-top: 1px" valign="top">Display images inside tty</td></tr>

</tbody></table><br>
<h3>Video</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ffmpeg -i &lt;file_in&gt; &lt;file_out&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Video and audio format converter. Has been replaced by avconv</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>avconv -i &lt;file_in&gt; &lt;file_out&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Video and audio format converter (libav-tools)</td></tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>openshot</code></strong></td><td style="padding-top: 1px" valign="top">Gui movie editor</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>openmovieeditor</code></strong></td><td style="padding-top: 1px" valign="top">Gui movie editor</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>aview, asciiview</code></strong></td><td style="padding-top: 1px" valign="top">ASCII art image viewer and video player</td></tr>

</tbody></table><br>

<p><br><p>
<h5>Awesome Debian Files</h5>
<h3>Bash</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>~/.bashrc</code></strong></td><td style="padding-top: 1px" valign="top">Executed at every shell startup, user specific</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/bash.bashrc</code></strong></td><td style="padding-top: 1px" valign="top">Executed at every shell startup, all users</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>~/.profile, .bash_profile, .bash_login</code></strong></td><td style="padding-top: 1px" valign="top">First file found executed at login, user specific</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/profile</code></strong></td><td style="padding-top: 1px" valign="top">Executed at login, all users (put PATHS here)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/rc.local</code></strong></td><td style="padding-top: 1px" valign="top">Last startup script executed, runs command as su</td></tr>

</tbody></table><br>
<h3>Home</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>~/.Xmodmap</code></strong></td><td style="padding-top: 1px" valign="top">Keyboard map</td></tr>

</tbody></table><br>
<h3>Bins</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/bin</code></strong></td><td style="padding-top: 1px" valign="top">Key programs like ls, cat, bash, ...</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/sbin</code></strong></td><td style="padding-top: 1px" valign="top">Key programs for system management like ifconfig, mkfs, fdisk, ...</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/usr/bin</code></strong></td><td style="padding-top: 1px" valign="top">Distribution managed programs</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/usr/sbin</code></strong></td><td style="padding-top: 1px" valign="top">Distribution managed system programs</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/usr/local/bin</code></strong></td><td style="padding-top: 1px" valign="top">User programs not managed by the distribution package</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/usr/local/sbin</code></strong></td><td style="padding-top: 1px" valign="top">User system management programs, not managed by the distribution package</td></tr>

</tbody></table><br>
<h3>General Config</h3>
<p>"Edit To Configure" or "Editable Text Configuration".</p>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/mailcap</code></strong></td><td style="padding-top: 1px" valign="top">Default programs for extensions</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/passwd</code></strong></td><td style="padding-top: 1px" valign="top">Users</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/groups</code></strong></td><td style="padding-top: 1px" valign="top">Groups</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>/etc/default</code></strong></td><td style="padding-top: 7px" valign="top">Boot script parameters that the end user or administrator is likely to change.<br></td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>/console-setup</code></strong></td><td style="padding-top:0px" valign="top">Set console (tty) character set, font size, ...</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/fstab</code></strong></td><td style="padding-top: 1px" valign="top">Filesystem table. To mount drive at startup, create dir in '<code>/media</code>' and append line like this : '<code>/dev/sda1   /media/data   ntfs   user,fmask=0111,dmask=0000   0   2</code>' (Check '<code>man fstab</code>' for details).</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/alternatives</code></strong></td><td style="padding-top: 1px" valign="top">Links to default application versions (here you can change the default Java JDK)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/issue</code></strong></td><td style="padding-top: 1px" valign="top">Name and version of distribution</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/fstab</code></strong></td><td style="padding-top: 1px" valign="top">Automatic mounts are handled by configuring the file</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/sudoers</code></strong></td><td style="padding-top: 1px" valign="top">Lists of users and the commands they can run with sudo (needs to be edited with visudo command)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/apt</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>/sources.list</code></strong></td><td style="padding-top:1px" valign="top">List of places where to look for packages</td></tr>

</table> </td> </tr>

</tbody></table><br>
<h3>Services</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/init/, ~/.init/</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>Init</code></strong></td><td style="padding-top:1px" valign="top">Upstart init daemon job configuration</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>/etc/init.d</code></strong></td><td style="padding-top: 7px" valign="top">Folder with service scripts, that get executed at start and end</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>/halt</code></strong></td><td style="padding-top:0px" valign="top">Runs at the end</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/rc&lt;level&gt;.d</code></strong></td><td style="padding-top: 1px" valign="top">Startup scripts for different runlevels - Links to scripts in /etc/init.d - S85httpd -&gt; S means startup, K is for stop. (To disable service just change S for K)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/rc.local</code></strong></td><td style="padding-top: 1px" valign="top">Last initialization file executed - Put your commands here</td></tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/init/ssh.conf</code></strong></td><td style="padding-top: 1px" valign="top">Sshd config</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/ssh/sshd_config</code></strong></td><td style="padding-top: 1px" valign="top">Sshd config</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/crontab</code></strong></td><td style="padding-top: 1px" valign="top">System-wide crontab</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/cron.hourly, /etc/cron.daily, ...</code></strong></td><td style="padding-top: 1px" valign="top">Links to scripts that will execute periodically. Scripts within a cron directory are run alphabetically.</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/rsyslog.conf | rsyslog.d/50-default.conf</code></strong></td><td style="padding-top: 1px" valign="top">Log conf (need to restart rsyslogd after edit)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/syslog.conf</code></strong></td><td style="padding-top: 1px" valign="top">Configuration information for syslogd</td></tr>

</tbody></table><br>
<h3>Network</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/resolv.conf</code></strong></td><td style="padding-top: 1px" valign="top">Dns information</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/sysconfig</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>/networking/devices/ifcfg-eth0</code></strong></td><td style="padding-top:1px" valign="top">Use ifcfg to configure a particular interface</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/services</code></strong></td><td style="padding-top: 1px" valign="top">List of internet services with their port numbers</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/NetworkManager</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>/NetworkManager.conf</code></strong></td><td style="padding-top:1px" valign="top">Configuration file</td></tr>

</table> </td> </tr>

</tbody></table><br>
<h3>Proc</h3>
<p>Various information about the system.</p>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/proc/cpuinfo</code></strong></td><td style="padding-top: 1px" valign="top">Information about the CPU</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/proc/modules</code></strong></td><td style="padding-top: 1px" valign="top">information about which kernel-modules are loaded on your system</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>/proc/net</code></strong></td><td style="padding-top: 7px" valign="top">Network related</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>/route</code></strong></td><td style="padding-top:0px" valign="top">Routing table</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>/netstat</code></strong></td><td style="padding-top:0px" valign="top">Displays contents of /proc/net files</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/proc/iomem</code></strong></td><td style="padding-top: 1px" valign="top">Neat memory map</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/proc/partitions</code></strong></td><td style="padding-top: 1px" valign="top">Partitions info</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>/proc/acpi</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>/battery/BAT1/info</code></strong></td><td style="padding-top:7px" valign="top">Battery info</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>/ac_adapter/ACAD/state</code></strong></td><td style="padding-top:0px" valign="top">Adapter info</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>/wakeup</code></strong></td><td style="padding-top:0px" valign="top">List of devices that can wake up your machine via acpi</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>sudo sh -c "echo USB1 &gt; /proc/acpi/wakeup"</code></strong></td><td style="padding-top:0px" valign="top">Enable device USB1 to wakeup computer from sleep/suspend</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/proc/net/wireless</code></strong></td><td style="padding-top: 1px" valign="top">Wireless connection info</td></tr>

</tbody></table><br>
<h3>Usr</h3>
<p>"Unix System Resources"</p>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/usr/lib</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:1px" valign="top"><strong><code>/jvm</code></strong></td><td style="padding-top:1px" valign="top">Java JREs and JDKs</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>/usr/share</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>/man</code></strong></td><td style="padding-top:7px" valign="top">Man pages</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>/bash-completion</code></strong></td><td style="padding-top:0px" valign="top">Bash completion functions</td></tr>

</table> </td> </tr>

</tbody></table><br>
<h3>Sbin</h3>
<p>The "system-administrator's bin file". Hosts programs that would be in /bin if they didn't have "root-only" access permissions.</p>
<h3>Var</h3>
<p>"Variable"</p>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>/var/log</code></strong></td><td style="padding-top: 7px" valign="top">System logs in here</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>/auth.log</code></strong></td><td style="padding-top:0px" valign="top">Logins</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>/syslog</code></strong></td><td style="padding-top:0px" valign="top">Most of the rest of the logs</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/var/spool</code></strong></td><td style="padding-top: 1px" valign="top">Contains data which is awaiting some kind of later processing</td></tr>

</tbody></table><br>
<h3>Boot</h3>
<p>Kernels.</p>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/boot/grub/menu.lst</code></strong></td><td style="padding-top: 1px" valign="top">Grub configuration file</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>/etc/default/grub</code></strong></td><td style="padding-top: 1px" valign="top">Grub configuration file</td></tr>

</tbody></table><br>

<p><br><p>
<h5>Git</h5>
<h3>Git Mantra</h3>
<pre><code>git init
git add &lt;file&gt; OR git add .
git status
git commit -am "&lt;commit_message&gt;"</code></pre>
<h3>Clone From Github</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git clone git@github.com:/&lt;user&gt;/&lt;project&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Download repo (later you keep refreshing with 'git pull origin master') -&gt; You need SSH key. If you don't want, use https://github.com/&lt;user&gt;/&lt;repo&gt; for address.</td></tr>

</tbody></table><br>
<h3>Generate Ssh Key</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>1.</code></strong></td><td style="padding-top: 1px" valign="top">Check for existing keys: cd ~/.ssh; ls -al</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>2.</code></strong></td><td style="padding-top: 1px" valign="top">Generate new key: ssh-keygen -t rsa -C "your_email@example.com"</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>3.</code></strong></td><td style="padding-top: 1px" valign="top">Add your key to the ssh-agent: ssh-add ~/.ssh/id_rsa</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>4.</code></strong></td><td style="padding-top: 1px" valign="top">Add your key to GitHub: copy contents of ~/.ssh/id_rsa.pub and paste them into key field at 'Account settings' &gt; 'SSH Keys' &gt; 'Add SSH key'.</td></tr>

</tbody></table><br>
<h3>Add To Github</h3>
<pre><code># Create remote repository on website.
git remote add origin git@github.com:/&lt;user&gt;/&lt;project&gt;.git
git pull origin master
git push origin master
# Sometimes also: git push --set-upstream origin master</code></pre>
<h3>Remote</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>git remote</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>update</code></strong></td><td style="padding-top:7px" valign="top">Get info about state of remote</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>show origin</code></strong></td><td style="padding-top:0px" valign="top">Print address of the origin</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>set-url origin &lt;origin&gt;</code></strong></td><td style="padding-top:0px" valign="top">'<code>git@github.com:&lt;user&gt;/&lt;repo&gt;.git</code>' - Change the url of origin, ssh key needed; '<code>https://www.github.com/&lt;user&gt;/&lt;repo&gt;.git</code>' - Same, but withouth key.</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git status -uno</code></strong></td><td style="padding-top: 1px" valign="top">Check if everything up-to-date</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git fetch; git checkout &lt;branch&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Checkout remote branch</td></tr>

</tbody></table><br>
<h3>Tags</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git push --tags</code></strong></td><td style="padding-top: 1px" valign="top">Push tags</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git fetch --tags</code></strong></td><td style="padding-top: 1px" valign="top">Pulling tags (automatically if on the same branch and there is a new commit?)</td></tr>

</tbody></table><br>
<h3>Undo</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>git reset</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>--hard HEAD~1</code></strong></td><td style="padding-top:7px" valign="top">Delete last commit and all of its changes</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>HEAD~1</code></strong></td><td style="padding-top:0px" valign="top">Delete last commit but keep your changes</td></tr>

</table> </td> </tr>

</tbody></table><br>
<h3>Also Useful</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git checkout HEAD^ &lt;file&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Retrieve deleted file</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git rm --cached &lt;file&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Untrack file without deleting it</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git tag -a 0.9.1 -m "Version 0.9.1 release"</code></strong></td><td style="padding-top: 1px" valign="top">Tag latest commit</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git tag</code></strong></td><td style="padding-top: 1px" valign="top">List local tags</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>chown -R &lt;user&gt;:&lt;group&gt; * (sudo)</code></strong></td><td style="padding-top: 1px" valign="top">In .git/objects</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git format-patch -1 &lt;sha&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Generate patch file</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git rev-parse HEAD</code></strong></td><td style="padding-top: 1px" valign="top">Get sha of head</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git revert</code></strong></td><td style="padding-top: 1px" valign="top"></td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git describe</code></strong></td><td style="padding-top: 1px" valign="top">Print version and hash of HEAD</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git log --name-only --author=&lt;name&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Print changed files by commit</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git log &lt;file&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Print files history</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git ls-files</code></strong></td><td style="padding-top: 1px" valign="top">List files</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git show &lt;revision&gt;:&lt;file&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Take a peek at the older revision of the file</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git diff &lt;commit&gt; &lt;commit&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Compare two commits</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git stash</code></strong></td><td style="padding-top: 1px" valign="top">If you want to switch branches, but you don't want to commit your changes yet, you can 'stash' them</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git stash apply</code></strong></td><td style="padding-top: 1px" valign="top">Apply the changes you stashed</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git stash list</code></strong></td><td style="padding-top: 1px" valign="top">List all the stashes</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git stash show -p stash@{0}</code></strong></td><td style="padding-top: 1px" valign="top">Show the diff of most recent stash</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git update-index --chmod=+x &lt;file&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Change files permissions</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git config -l</code></strong></td><td style="padding-top: 1px" valign="top">Print repos configuration settings</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git config core.filemode false</code></strong></td><td style="padding-top: 1px" valign="top">Ignores executable bit of the files</td></tr>

</tbody></table><br>
<h3>Checkout</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git log &gt; ../gitLog</code></strong></td><td style="padding-top: 1px" valign="top">First save log to file</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git checkout &lt;hash&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Then checkout previous versions</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git checkout head</code></strong></td><td style="padding-top: 1px" valign="top">Return to head</td></tr>

</tbody></table><br>
<h3>Github Md Format</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>![Alt text](/doc/basket-stats.png?raw=true "&lt;Description&gt;")</code></strong></td><td style="padding-top: 1px" valign="top">Insert image</td></tr>

</tbody></table><br>
<h3>Bisect</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git bisect start</code></strong></td><td style="padding-top: 1px" valign="top"></td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git bisect bad</code></strong></td><td style="padding-top: 1px" valign="top">Tell git that current version is bad</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git bisect good v25.0.2</code></strong></td><td style="padding-top: 1px" valign="top">Tell git the last good version you know about. Now git will checkout a version in between, so you can check it and tell:</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git bisect bad/good</code></strong></td><td style="padding-top: 1px" valign="top">This will continue until the commit that introduced the bug is found</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git bisect reset</code></strong></td><td style="padding-top: 1px" valign="top">Exit bisect mode</td></tr>

</tbody></table><br>
<h3>Tools</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gitk</code></strong></td><td style="padding-top: 1px" valign="top">Repo explorer</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gitg</code></strong></td><td style="padding-top: 1px" valign="top">A bit nicer version</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>tig</code></strong></td><td style="padding-top: 1px" valign="top">Text based repo explorer</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gitstats</code></strong></td><td style="padding-top: 1px" valign="top">Generates stats for git repo, outputs HTML</td></tr>

</tbody></table><br>
<h3>Virtual Box</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git config core.filemode false</code></strong></td><td style="padding-top: 1px" valign="top">Ignores the filemode changes made by the host system</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>git config --global --unset https.proxy</code></strong></td><td style="padding-top: 1px" valign="top">If problem pulling</td></tr>

</tbody></table><br>

<p><br><p>
<h5>Vim</h5>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>+&lt;linenum&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Open file at line number</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>alt+&lt;normal mode key&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Escape, key !!!!!!!!!!!!!!!!!</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+[</code></strong></td><td style="padding-top: 1px" valign="top">Escape</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>.</code></strong></td><td style="padding-top: 1px" valign="top">Execute last command again</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>;</code></strong></td><td style="padding-top: 1px" valign="top">Repeat the last character-wise search</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>\c</code></strong></td><td style="padding-top: 1px" valign="top">Case insensitive search</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>?</code></strong></td><td style="padding-top: 1px" valign="top">Search backward</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>V</code></strong></td><td style="padding-top: 1px" valign="top">Linewise visual mode</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>~</code></strong></td><td style="padding-top: 1px" valign="top">Switch case</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Tab selection right</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>&gt;&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Tab line right</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>P</code></strong></td><td style="padding-top: 1px" valign="top">Paste before cursor</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>x</code></strong></td><td style="padding-top: 1px" valign="top">Delete character</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gF</code></strong></td><td style="padding-top: 1px" valign="top">Open file under cursor</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>K</code></strong></td><td style="padding-top: 1px" valign="top">Look up word under cursor in man pages</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+v</code></strong></td><td style="padding-top: 1px" valign="top">Select visual box (block select)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:e</code></strong></td><td style="padding-top: 1px" valign="top">Reload file</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:sav</code></strong></td><td style="padding-top: 1px" valign="top">Save file as and keep new file open (save as)</td></tr>

</tbody></table><br>
<h3>Help</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+]</code></strong></td><td style="padding-top: 1px" valign="top">Follow link</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+o</code></strong></td><td style="padding-top: 1px" valign="top">Go back</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:q</code></strong></td><td style="padding-top: 1px" valign="top">Exit help<br></td></tr>

</tbody></table><br>
<h3>Movement</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>e</code></strong></td><td style="padding-top: 1px" valign="top">End of word</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>E</code></strong></td><td style="padding-top: 1px" valign="top">End of WORD</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>W</code></strong></td><td style="padding-top: 1px" valign="top">Start of WORD</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ge</code></strong></td><td style="padding-top: 1px" valign="top">End of previous word</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>), (</code></strong></td><td style="padding-top: 1px" valign="top">Sentence</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>{, }</code></strong></td><td style="padding-top: 1px" valign="top">Paragraph</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>]], [[</code></strong></td><td style="padding-top: 1px" valign="top">Section</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:&lt;num&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Goto line number</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+o</code></strong></td><td style="padding-top: 1px" valign="top">Go to previous location</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+i</code></strong></td><td style="padding-top: 1px" valign="top">Go to next location</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>%</code></strong></td><td style="padding-top: 1px" valign="top">Jump to matching bracket</td></tr>

</tbody></table><br>
<h3>Lines</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>0</code></strong></td><td style="padding-top: 1px" valign="top">Start of line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>^,_</code></strong></td><td style="padding-top: 1px" valign="top">First non-blank of line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>+,-</code></strong></td><td style="padding-top: 1px" valign="top">First non-blank of next/previous line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>Enter</code></strong></td><td style="padding-top: 1px" valign="top">First non-blank of next line</td></tr>

</tbody></table><br>
<h3>Screen Lines</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>g0, g$</code></strong></td><td style="padding-top: 1px" valign="top">Start/end of screen line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gm</code></strong></td><td style="padding-top: 1px" valign="top">Middle of screen line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gk, gj</code></strong></td><td style="padding-top: 1px" valign="top">Up/down one screen line</td></tr>

</tbody></table><br>
<h3>Page Up/Down</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>H,M,L</code></strong></td><td style="padding-top: 1px" valign="top">Go to top/middle/bottom of screen</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl F,B</code></strong></td><td style="padding-top: 1px" valign="top">Page up/down</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl D,U</code></strong></td><td style="padding-top: 1px" valign="top">Half page up/down</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl E,Y</code></strong></td><td style="padding-top: 1px" valign="top">One more line at bottom/top</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>z Enter, z., z-</code></strong></td><td style="padding-top: 1px" valign="top">Reposition line with cursor at top/middle/bottom</td></tr>

</tbody></table><br>
<h3>Search</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>*,#</code></strong></td><td style="padding-top: 1px" valign="top">Search forward/backward for exact word under cursor</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>g*,g#</code></strong></td><td style="padding-top: 1px" valign="top">Same, but even when word is embedded</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>%</code></strong></td><td style="padding-top: 1px" valign="top">Find match of current brace, quote,...</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>fx,Fx</code></strong></td><td style="padding-top: 1px" valign="top">Move cursor forward/backward to x on current line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>tx,Tx</code></strong></td><td style="padding-top: 1px" valign="top">Same, but to one char before x</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>;/,</code></strong></td><td style="padding-top: 1px" valign="top">Repeat/reverse last</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:%s/old/new/gc</code></strong></td><td style="padding-top: 1px" valign="top">Replace, like sed, c means with conformations</td></tr>

</tbody></table><br>
<h3>Marks</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>'"</code></strong></td><td style="padding-top: 1px" valign="top">Move to position of last edit of file</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>`.</code></strong></td><td style="padding-top: 1px" valign="top">Move to last change in file</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>`0</code></strong></td><td style="padding-top: 1px" valign="top">Position where you last exited vim</td></tr>

</tbody></table><br>
<h3>Insert Mode Commands</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+h</code></strong></td><td style="padding-top: 1px" valign="top">Backspace</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+u</code></strong></td><td style="padding-top: 1px" valign="top">Delete line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+w</code></strong></td><td style="padding-top: 1px" valign="top">Delete previous word</td></tr>

</tbody></table><br>
<h3>Macros</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>q&lt;x&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Record actions (macro) into x</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>q</code></strong></td><td style="padding-top: 1px" valign="top">Stop recording macro</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>@&lt;x&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Execute x (macro)</td></tr>

</tbody></table><br>
<h3>Registers</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>"ayy</code></strong></td><td style="padding-top: 1px" valign="top">Copy line into register a</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>"ap</code></strong></td><td style="padding-top: 1px" valign="top">Paste register a</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:reg</code></strong></td><td style="padding-top: 1px" valign="top">Access all registers</td></tr>

</tbody></table><br>
<h3>Set Command</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:set &lt;x&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Set x</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:set no&lt;x&gt;, &lt;x&gt;!</code></strong></td><td style="padding-top: 1px" valign="top">Unset x</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:set &lt;x&gt;=value</code></strong></td><td style="padding-top: 1px" valign="top">Assign x</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:set &lt;x&gt;-=value</code></strong></td><td style="padding-top: 1px" valign="top">Remove value form &lt;x&gt;</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:set all</code></strong></td><td style="padding-top: 1px" valign="top">Print all values</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:set &lt;x&gt;?</code></strong></td><td style="padding-top: 1px" valign="top">Print x</td></tr>

</tbody></table><br>
<h3>Set Command Operands</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>autoident, ai</code></strong></td><td style="padding-top: 1px" valign="top">Autoident (noai)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>backup, bk</code></strong></td><td style="padding-top: 1px" valign="top">Back file up before overwrite (nobackup)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ignorecase, ic</code></strong></td><td style="padding-top: 1px" valign="top">Ignore case in search (noic)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>number, nu</code></strong></td><td style="padding-top: 1px" valign="top">Display line numbers (nonu)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>relativenumber, rnu</code></strong></td><td style="padding-top: 1px" valign="top">Display relative numbers (nornu)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>shiftwidth, sw</code></strong></td><td style="padding-top: 1px" valign="top">Number of spaces added when indenting (8)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>tabstop, ts</code></strong></td><td style="padding-top: 1px" valign="top">Tab width (8)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>wrap</code></strong></td><td style="padding-top: 1px" valign="top">Wrap lines (wrap)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>wrapscan, ws</code></strong></td><td style="padding-top: 1px" valign="top">Search wraps around file (ws)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>mouse=a</code></strong></td><td style="padding-top: 1px" valign="top">Mouse mode (use shift when selecting to copy to clipboard)</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>linebreak</code></strong></td><td style="padding-top: 1px" valign="top">Do not break words</td></tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:set iskeyword-=.</code></strong></td><td style="padding-top: 1px" valign="top">Remove dot from words part (two words if separated with dot)</td></tr>

</tbody></table><br>
<h3>Edit Commands</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>[n] operation [m] motion</code></strong></td><td style="padding-top: 1px" valign="top">If both n and m are specified then n x m</td></tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>c, d, y</code></strong></td><td style="padding-top: 1px" valign="top">Change, delete, yank</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>C, D, Y</code></strong></td><td style="padding-top: 1px" valign="top">Till the end of line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>cc, dd, yy</code></strong></td><td style="padding-top: 1px" valign="top">Current line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>cf&lt;x&gt;, df&lt;x&gt;, yf&lt;x&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Forward up to x</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>c), d), y)</code></strong></td><td style="padding-top: 1px" valign="top">Sentence</td></tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>~</code></strong></td><td style="padding-top: 1px" valign="top">Change case of character</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>g~w</code></strong></td><td style="padding-top: 1px" valign="top">Switch case of a word</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gu, gU</code></strong></td><td style="padding-top: 1px" valign="top">To lower/upper case</td></tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>[p</code></strong></td><td style="padding-top: 1px" valign="top">Paste but match current indentation</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>r</code></strong></td><td style="padding-top: 1px" valign="top">Replace character</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>S</code></strong></td><td style="padding-top: 1px" valign="top">Substitute entire line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>x,X</code></strong></td><td style="padding-top: 1px" valign="top">Delete character/delete back</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>.</code></strong></td><td style="padding-top: 1px" valign="top">Repeat last change</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+a, ctrl+x</code></strong></td><td style="padding-top: 1px" valign="top">Increment/decrement number under cursor</td></tr>

</tbody></table><br>
<h3>Automatic Linebrake (Wrap)</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gq</code></strong></td><td style="padding-top: 1px" valign="top">Formats (wraps) selected text</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gqq</code></strong></td><td style="padding-top: 1px" valign="top">Format current line</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:set tw=72</code></strong></td><td style="padding-top: 1px" valign="top">Set text width</td></tr>

</tbody></table><br>
<h3>Advanced</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>tw=72 fo=cq wm=0</code></strong></td><td style="padding-top: 1px" valign="top">No automatic wrapping, rewrapping will wrap to 72</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>tw</code></strong></td><td style="padding-top: 1px" valign="top">Controls the wrap width you would like to use</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>fo</code></strong></td><td style="padding-top: 1px" valign="top">Controls whether or not automatic text wrapping is enabled, depending whether or not the t flag is set</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>wm</code></strong></td><td style="padding-top: 1px" valign="top">Controls when to wrap based on terminal size</td></tr>

</tbody></table><br>
<h3>Colorscheme</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>:colorscheme</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>darkblue, torte</code></strong></td><td style="padding-top:7px" valign="top">Nice, darker</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>slate, default</code></strong></td><td style="padding-top:0px" valign="top">Less contrast</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:highlight Normal ctermbg=grey</code></strong></td><td style="padding-top: 1px" valign="top">Set light background</td></tr>

</tbody></table><br>
<h3>Spellcheck</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:set spell spelllang=en_us</code></strong></td><td style="padding-top: 1px" valign="top">Turn spellcheck on</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:set nospell</code></strong></td><td style="padding-top: 1px" valign="top">Turn off</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:setlocal spell spelllang=en_us</code></strong></td><td style="padding-top: 1px" valign="top">Set dictionary</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>z=</code></strong></td><td style="padding-top: 1px" valign="top">Show suggestions for misspelled word</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>]s</code></strong></td><td style="padding-top: 1px" valign="top">Go to next misspelled word</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>[s</code></strong></td><td style="padding-top: 1px" valign="top">Go to previous misspelled word</td></tr>

</tbody></table><br>
<h3>Tabs</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:tabe &lt;file&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Open new tab</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gt, gT</code></strong></td><td style="padding-top: 1px" valign="top">Go to next/previous tab</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+pgup/pgdn</code></strong></td><td style="padding-top: 1px" valign="top">Switch tab</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>vim -p</code></strong></td><td style="padding-top: 1px" valign="top">Open one tab page per file</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ZZ</code></strong></td><td style="padding-top: 1px" valign="top">Save and close tab (same as :wq)</td></tr>

</tbody></table><br>
<h3>Splits</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:vsp</code></strong></td><td style="padding-top: 1px" valign="top">Split vertically</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl-w, direction</code></strong></td><td style="padding-top: 1px" valign="top">Move to split</td></tr>

</tbody></table><br>
<h3>Autocomplete</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+n</code></strong></td><td style="padding-top: 1px" valign="top">Show autocomplete suggestions</td></tr>

</tbody></table><br>
<h3>Hexdump</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:%!xxd</code></strong></td><td style="padding-top: 1px" valign="top">Convert to hex</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:%!xxd -r</code></strong></td><td style="padding-top: 1px" valign="top">Convert back</td></tr>

</tbody></table><br>
<h3>Vundle</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>:PluginInstall</code></strong></td><td style="padding-top: 1px" valign="top">Install plugins</td></tr>

</tbody></table><br>
<h3>Reformat Code</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>=</code></strong></td><td style="padding-top: 1px" valign="top">Fix indentation</td></tr>

</tbody></table><br>

<p><br><p>
<h5>Misc</h5>
<h3>Piratebay</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>torrents.thepiratebay.sx/7532474/Cabin.torrent</code></strong></td><td style="padding-top: 1px" valign="top">Download torrent file</td></tr>

</tbody></table><br>
<h3>Java</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>javac -cp &lt;path&gt;:&lt;path&gt;...</code></strong></td><td style="padding-top: 1px" valign="top">Tell Java where libraries are located</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>java -Xmx6g myprogram</code></strong></td><td style="padding-top: 7px" valign="top">Reserve 6 giga for process</td></tr>
<tr> <td></td> <td> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-jar &lt;jar&gt;</code></strong></td><td style="padding-top:0px" valign="top">Execute jar</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-cp .:&lt;path&gt;:&lt;path&gt;...</code></strong></td><td style="padding-top:0px" valign="top">Tell java where libraries are located, you also need to pass the location of class among paths, hence .:</td></tr>

</table> </td> </tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>export _JAVA_OPTIONS=-Xmx1000m</code></strong></td><td style="padding-top: 1px" valign="top">Set heap space globally</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>appletviewer &lt;page&gt;.html</code></strong></td><td style="padding-top: 1px" valign="top">Run Java applet</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>jps -lvm</code></strong></td><td style="padding-top: 1px" valign="top">List java processes</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>jmap -histo:live &lt;pid&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Memory map</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>jvisualvm</code></strong></td><td style="padding-top: 1px" valign="top">Profiler</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>jar cvfe "bla.jar" &lt;main_class&gt; *.class</code></strong></td><td style="padding-top: 1px" valign="top">Create executable jar</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>jar xf &lt;jar&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Extract files from jar</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>jar tf &lt;jar&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Print contents of a jar</td></tr>

</tbody></table><br>
<h3>Install Oracle Jdk</h3>
<pre><code>sudo apt-get remove openjdk*
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer</code></pre>
<h3>Install Oracle Jdk On Debian</h3>
<pre><code>echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | sudo tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | sudo tee -a /etc/apt/sources.list.d/webupd8team-java.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo apt-get install oracle-java7-set-default</code></pre>
<h3>Firefox</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>about:config</code></strong></td><td style="padding-top: 1px" valign="top">Layout.css.devPixelsPerPx default zoom (-1.0)</td></tr>

</tbody></table><br>
<h3>Xrandr</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>xrandr</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>--output VGA1 --primary</code></strong></td><td style="padding-top:7px" valign="top">Changes primary screen</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>--output VGA1 --auto --pos 0x0</code></strong></td><td style="padding-top:0px" valign="top">'<code>--output LVDS1 --auto --right-of VGA1</code>' - To change their relative positions</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>-q</code></strong></td><td style="padding-top:0px" valign="top">List devices</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>--auto</code></strong></td><td style="padding-top:0px" valign="top">Reset</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>--output LVDS1 --off</code></strong></td><td style="padding-top:0px" valign="top">Turn off laptop screen</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>--output [VGA|HDMI] --mode 1600x1200</code></strong></td><td style="padding-top:0px" valign="top">24" 16x12 on</td></tr>

</table> </td> </tr>

</tbody></table><br>
<h3>Mount Iso</h3>
<pre><code>sudo mkdir /media/x
sudo mount -o loop &lt;path_to_iso&gt; /media/x</code></pre>
<h3>Eclipse</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+1</code></strong></td><td style="padding-top: 1px" valign="top">Quick fix</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>alt+shift+s</code></strong></td><td style="padding-top: 1px" valign="top">Source submenu</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+F7, esc</code></strong></td><td style="padding-top: 1px" valign="top">Close pop-up console window</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ctrl+7, ctrl+/</code></strong></td><td style="padding-top: 1px" valign="top">Toggle comment</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>F3</code></strong></td><td style="padding-top: 1px" valign="top">Goto definition</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>objectaid</code></strong></td><td style="padding-top: 1px" valign="top">UML plugin</td></tr>

</tbody></table><br>
<h3>Wine</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>winecfg</code></strong></td><td style="padding-top: 1px" valign="top">Drives tab to set drive</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>wine explorer /desktop=abalaba,1024x768 app.exe</code></strong></td><td style="padding-top: 1px" valign="top">Run wine app in virtual desktop</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>reason on wine: down alt down</code></strong></td><td style="padding-top: 1px" valign="top">Open menu</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>regedit</code></strong></td><td style="padding-top: 1px" valign="top">Registry editor</td></tr>

</tbody></table><br>
<h3>Cygwin</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>[cygwin] ssh-host-cofig</code></strong></td><td style="padding-top: 1px" valign="top"></td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>[command prompt] net start sshd</code></strong></td><td style="padding-top: 1px" valign="top"></td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>[any] ssh &lt;windows_username - CASE MATTERS!&gt;@&lt;host&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Run sshd (use windows password)</td></tr>

</tbody></table><br>
<h3>Golang</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 7px;width: 155px" valign="top"><strong><code>go</code></strong></td><td valign="top"> <table style="border-spacing: 0px">
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:7px" valign="top"><strong><code>build</code></strong></td><td style="padding-top:7px" valign="top">Compile packages and dependencies</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>clean</code></strong></td><td style="padding-top:0px" valign="top">Remove object files</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>env</code></strong></td><td style="padding-top:0px" valign="top">Print Go environment information</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>fix</code></strong></td><td style="padding-top:0px" valign="top">Run go tool fix on packages</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>fmt</code></strong></td><td style="padding-top:0px" valign="top">Run gofmt on package sources</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>get</code></strong></td><td style="padding-top:0px" valign="top">Download and install packages and dependencies (first you need to set GOPATH to dir where packages will get downloaded)</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>install</code></strong></td><td style="padding-top:0px" valign="top">Compile and install packages and dependencies</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>list</code></strong></td><td style="padding-top:0px" valign="top">List packages</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>run</code></strong></td><td style="padding-top:0px" valign="top">Compile and run Go program</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>test</code></strong></td><td style="padding-top:0px" valign="top">Test packages</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>tool</code></strong></td><td style="padding-top:0px" valign="top">Run specified go tool</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>version</code></strong></td><td style="padding-top:0px" valign="top">Print Go version</td></tr>
<tr> <td style="width:1px;white-space:nowrap;padding-right:10px;padding-top:0px" valign="top"><strong><code>vet</code></strong></td><td style="padding-top:0px" valign="top">Run go tool vet on packages</td></tr>

</table> </td> </tr>

</tbody></table><br>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>syntax highlight</code></strong></td><td style="padding-top: 1px" valign="top">'<code>https://github.com/jnwhiteh/vim-golang</code>'</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>for gedit</code></strong></td><td style="padding-top: 1px" valign="top">'<code>sudo cp /usr/share/gtksourceview-3.0/language-specs/go.lang /usr/share/gtksourceview-2.0/language-specs/</code>'</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>simple ncurses</code></strong></td><td style="padding-top: 1px" valign="top">Go get github.com/nsf/termbox-go</td></tr>

</tbody></table><br>
<h3>Repackaging A Linux Install Iso</h3>
<pre><code># Mount ISO
mkdir -p /mnt/linux
mount -o loop /tmp/linux-install.iso /mnt/linux</code></pre>
<pre><code># Copy contents to a working directory
cd /mnt/
tar -cvf — Linux | (cd /var/tmp && tar -xf — )</code></pre>
<pre><code># Make your changes and repackage (on Debian use genisoimage). -c passes the name of the file that will be created
cd /var/tmp/linux
mkisofs -o ../your-new.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V Your Disk Name Here .</code></pre>
<h3>Gdb</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gdb &lt;cmd&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Start gdb</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>run &lt;arguments&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Start debugging</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>run &lt; &lt;file&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Run with piped input</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>up</code></strong></td><td style="padding-top: 1px" valign="top">Follow trace</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>print &lt;variable&gt;</code></strong></td><td style="padding-top: 1px" valign="top">Print variable</td></tr>

</tbody></table><br>
<h3>Coredump</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>ulimit -c unlimited</code></strong></td><td style="padding-top: 1px" valign="top">Set core file limit to unlimited</td></tr>
<tr><td width=155px></td><td></td></tr><tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>gdb &lt;cmd&gt; core</code></strong></td><td style="padding-top: 1px" valign="top">Debug core file with gdb</td></tr>

</tbody></table><br>
<h3>Chrome</h3>
<table width=780 style="border-spacing: 0px"><tbody>
<tr><td style="padding-right: 10px;padding-top: 1px;width: 155px" valign="top"><strong><code>F6, ctrl+l, alt+d</code></strong></td><td style="padding-top: 1px" valign="top">Go to address bar</td></tr>

</tbody></table><br>
  <!-- <div id=bla></div> -->
  </div>
  
  <footer>
    <aside>January 30, 2019</aside>
    <a href="../" rel="author">Jure Šorn</a>
  </footer>

  <br>
  <br>
  <br>

</body>
</html>
